Johnny Spindler
Johnny Spindler

Reputation: 456

Power BI Visuals with Measures only without summing up

Situation:
My Report calculates the ranking developments of an accounts in one measure:

Class_Evolution = [Class_Minus_0] & " <-- " & [Class_Minus_1] 

Combined with data from the source table the measures show good results per datarow. The results look like:
enter image description here ...

[Class_Minus_0] and [Class_Minus_1] are measures with X-functions themself that result in a ranking (A,B,C,D) depending on slicer selection.
I also have a measure that counts the rows:

Count Values = COUNTROWS(ExhibitorClass)

This works so far.

Problem:
Now I need to crate visuals with the measures I created. But when I put my measures on a visual they just get summed up: enter image description here


Need:
I need to built the visuals as in the example below but by using my measured instead of columns.
I have build the report without a slicer on fixed data columns with fixed ranking cutoffs and got a nice result:

enter image description here


However I need to be able to calculate the ranking development with the slicer so I need to build everything with measures.
How should I build my measures to get the visuals I need? Please help me.

Upvotes: 0

Views: 597

Answers (1)

Johnny Spindler
Johnny Spindler

Reputation: 456

Thanks to Andrew, I was able to implement the following solution. I needed a new Table matching the possible results of the measure:
enter image description here

Then with a VAR variable in a DAX measure the matching values could be counted:

Visual Count Class Evolution = 
    VAR _rank_evolution = SELECTEDVALUE('Class_Evolution'[Class_Evolution]) 
    return sumx('ExhibitorClass_Details', if([Class_Evolution] = _rank_evolution, 1,0))

The variable was populated form my [Class_Evolution] table and if the measure used on my [ExhibitorClass_Details] details table matched the Class_Evolution it was summed up.

Upvotes: 0

Related Questions