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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
celen
Frequent Visitor

Matrix and subtotal

Hi, 

 

I got this matrix with Value 1 and Value 2. Value 3 is depending if the date is before or after given date. In below example if date is <= 2023-12-31, Value 3 should be same as Value 2 otherwise Value 1. So far no problem...

celen_0-1704786207012.png

...but how should re-write the measure for Value 3 in order for the subtotal on month level to be correct? ( Jan, Feb ... should also be 28.581)

 

celen_1-1704786534414.png

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @celen 
You SELECTEDVALUE 'Calendar'[Date] would return blank at month level as there is no single value of date. You need to replace with MIN

Value 3 =
IF (
    MIN ( 'Calendar'[Date] ) <= SELECTEDVALUE ( CalendarActualForecast[Date] ),
    [Value 2],
    [Value 1]
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @celen 
You SELECTEDVALUE 'Calendar'[Date] would return blank at month level as there is no single value of date. You need to replace with MIN

Value 3 =
IF (
    MIN ( 'Calendar'[Date] ) <= SELECTEDVALUE ( CalendarActualForecast[Date] ),
    [Value 2],
    [Value 1]
)

Helpful resources

Announcements