Reversing the relationship direction for a single DAX measure (CROSSFILTER?)

Shortmeister1

Board Regular
Joined
Feb 19, 2008
Messages
204
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2010
  5. 2007
  6. 2003 or older
Platform
  1. Windows
Hi

I've got a growing table as listed below. I also have created a very simple data model schema as below.

The eagle eyed among you will notice that I have reversed the relationship from the incident fact table to the calendar table so that I can pick up all dates which accounts for "Cat0"

So to put it in context, a typical measure will look like this:


Code:
=CALCULATE(
    COUNTROWS(fIncident),
    fIncident[Cat] = 1
    )

whereas Cat0 looks like this:
Code:
=CALCULATE(
    COUNTROWS('Calendar'),
    ISBLANK( fIncident[Cat]),
    CROSSFILTER(fIncident[Date], 'Calendar'[Date], OneWay)
    )

I've been trying to use CROSSFILTER to avoid having to reverse the Calendar relationship, but it's not working unless the relationship is left "backwards". In fact, it changes all of the other measures.

Anyone got any great suggestions on how to use CROSSFILTER properly in this scenario?

Thanks
Martin

1695816558911.png

1695816699147.png
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Changing OneWay to Both maybe?
 
Upvote 0

Forum statistics

Threads
1,215,121
Messages
6,123,177
Members
449,093
Latest member
bes000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top