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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
sglendenning
Helper II
Helper II

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 II
Helper II

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 II
Helper II

Figured it out;

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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