Forum Discussion
Gulbaz
4 years agoFrequent Visitor
conditional measure total is wrong in power bi table matrix
Hi I have Four Tables, Calendar, Location, Sales and Targets. They have Relationships with like one to many as below Calendar Date with Sales Date Calendar Date with Targets Date Location ID with...
- 4 years ago
This can be handled with a separate totals measure. I'm assuming your date table has a [Year Month] column (or similar). If not, it's worth adding to your date table.
Base Measure = IF ( MONTH ( MAX ( 'Calender 2'[Date] ) < MONTH ( TODAY () ) ), SUM ( 'Value Entry Stock All Items'[Sales Amount (Actual)] ), SUM ( Targets[JAN Target] ) )Total Measure = SUMX ( VALUES ( 'Calender 2'[Year Month] ), [Base Measure] )
DataInsights
Super User
4 years ago
This can be handled with a separate totals measure. I'm assuming your date table has a [Year Month] column (or similar). If not, it's worth adding to your date table.
Base Measure =
IF (
MONTH ( MAX ( 'Calender 2'[Date] ) < MONTH ( TODAY () ) ),
SUM ( 'Value Entry Stock All Items'[Sales Amount (Actual)] ),
SUM ( Targets[JAN Target] )
)Total Measure =
SUMX ( VALUES ( 'Calender 2'[Year Month] ), [Base Measure] )
gulbazk
4 years agoRegular Visitor
Thank u soooo much Bro. It worked for me.