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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Changing OneWay to Both maybe?
 
Upvote 0

Forum statistics

Threads
1,223,937
Messages
6,175,518
Members
452,650
Latest member
Tinfish

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