Forum Discussion
sixtoquiles
9 years agoHelper II
Help with this...
HI Everyone.... I have this table in my PowerBI (am using direct query) the original table is much bigger, this just a sample, And i need to create a measure to: How many Custome...
- 9 years ago
Ooops,
I cut and paste the wrong measure in
Please try this
Measure2 = IF( HASONEVALUE( 'Table1'[Target] ), MAX(Table1[Target]), SUMX( SUMMARIZE( 'Table1',Table1[Date],Table1[District], "Max Per Day",MAX('Table1'[Target])),[Max Per Day]) ) - 9 years ago
Oh yeah, that's not ideal
Please try this slight tweak :)
Measure2 = IF( ISFILTERED( 'Table1'[Target] ), MAX(Table1[Target]), SUMX( SUMMARIZE( 'Table1',Table1[Date],Table1[District], "Max Per Day",MAX('Table1'[Target])),[Max Per Day]) )
Phil_Seamark
9 years agoMicrosoft Employee
Hi sixtoquiles
I created some simple calculated measures using the following forumlas
Count CustID = CALCULATE(DISTINCTCOUNT(Table1[CustomerID])) Target District = CALCULATE(MAX(Table1[Target]))
But equally you might be able to achieve it by dragging the feild to the visual and setting the aggreation to be Count (Distinct)
- sixtoquiles9 years agoHelper II
Thanks.. to take from you time
But I need is a total of TargetDistrict (5+3+4) = 12
- Phil_Seamark9 years agoMicrosoft Employee
Hi sixtoquiles
Please see my post below
- Phil_Seamark9 years agoMicrosoft Employee
This is looking better.
Measure = IF( HASONEVALUE( 'Table1'[Target] ), MAX(Table1[Target]), SUMX( SUMMARIZE( 'Table1',Table1[Date], "Max per day",MAX('Table1'[Target])),[Max per day]) )