Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sglendenning
Helper I
Helper I

Problems with Dates in a measure with USERELATIONSHIP

The following measure is being used as the denominator in a calculation but I have a slicer on the page where if I select a value from the slicer I don't want the denominator value to change.  In the table below I always want the denominator to be 6381 regardless if I select either Same Month or Diff Month from the slicer on the page.  This has to be able to work in a table that has more than one month at a time...e.g. it will have each month of 2022 and each month will have different expirations.

 

CALCULATE(sum(Combined[Units]),USERELATIONSHIP('Date'[Date],Combined[ExpirationDate]))
 
CalendarYearExpirations
20226381
Feb6381
Same Month6199
Diff Month182
1 ACCEPTED SOLUTION
sglendenning
Helper I
Helper I

Figured it out;

CALCULATE(sum(Combined[Units]),USERELATIONSHIP('Date'[Date],Combined[ExpirationDate]),ALL(Combined[MONTH BIN]))

View solution in original post

1 REPLY 1
sglendenning
Helper I
Helper I

Figured it out;

CALCULATE(sum(Combined[Units]),USERELATIONSHIP('Date'[Date],Combined[ExpirationDate]),ALL(Combined[MONTH BIN]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.