measure other measures

When you want to measure other measures, you need the iterative functions (a.k.a the “X” functions).
In this case they wanted COUNTX().
I threw together an example PBIX with some random data. I have 4 data measurements each day (M1 – M4), each ranging from 1 – 99. I created a measure named GreaterThan50 as
GreaterThan50 = IF(HASONEVALUE(Data[Date]) && HASONEVALUE(Data[Attribute]), IF (VALUES(Data[Value]) > 50, "Y", "N"), BLANK())
I then created a calculated column on the data table named GT, which stored the values of this measure. The data was unpivoted, so each row has a single measurement and a single date. That ensured that the measure wasn’t blank.
I took this column and used the VALUES() function to create a new table, MeasureValues.
MeasureValues = VALUES(Data[GT])
This gave me a table of all of the measure values of the data. In this case it was just “Y” and “N”, but it could have been any number of different values, depending on how they defined the original measure.
I then created the measure MeasureCounts:
MeasureCounts = 
VAR MeasureValue = SELECTEDVALUE(MeasureValues[GT])
RETURN COUNTX(FILTER(Data, [GreaterThan50] = MeasureValue), [GreaterThan50])
Then with a matrix visualization, I added Date as the row, GT as the column, and MeasureCounts as the Values.
We then have what we are looking for.
thumbnail image


Popular Posts