Forum Discussion
Using Calculated Measures to derive new Stats / Visualisations
- 8 years ago
Anonymous
Such detailed description does make your requirement as clear as crystal!:smileyhappy: It is always a really good practice to ask a question in a forum. :smileywink:
For your case, I will create a auxiliary table and two measures as below. See more details in the attached pbix.
HighLowCnt = VAR summizedTbl = ADDCOLUMNS ( SUMMARIZE ( 'Table', 'Table'[Customer], "totalPrem", SUM ( 'Table'[Premium] ) ), "level", IF ( [totalPrem] > 400, "High", "Low" ) ) RETURN COUNTROWS ( FILTER ( summizedTbl, [level] = LASTNONBLANK ( 'Level'[Level], "" ) ) )
HighLowLvl = IF(SUM('Table'[Premium])>400,"High","Low") - Anonymous8 years ago
Thanks Eric for the solution. Please correct me if my understanding of the solution is incorrect ...
"summizedTbl" gets calculated / evaluated for each of the Level values "High" and "Low". If I have 10 different bands then the "summizedTbl" get calculated for all the Bands.
Would this slow down the performance of my PowerBI Report / Dashboard ???
Anonymous
Such detailed description does make your requirement as clear as crystal!:smileyhappy: It is always a really good practice to ask a question in a forum. :smileywink:
For your case, I will create a auxiliary table and two measures as below. See more details in the attached pbix.
HighLowCnt =
VAR summizedTbl =
ADDCOLUMNS (
SUMMARIZE ( 'Table', 'Table'[Customer], "totalPrem", SUM ( 'Table'[Premium] ) ),
"level", IF ( [totalPrem] > 400, "High", "Low" )
)
RETURN
COUNTROWS (
FILTER ( summizedTbl, [level] = LASTNONBLANK ( 'Level'[Level], "" ) )
)
HighLowLvl = IF(SUM('Table'[Premium])>400,"High","Low")
Thanks Eric for the solution. Please correct me if my understanding of the solution is incorrect ...
"summizedTbl" gets calculated / evaluated for each of the Level values "High" and "Low". If I have 10 different bands then the "summizedTbl" get calculated for all the Bands.
Would this slow down the performance of my PowerBI Report / Dashboard ???