Forum Discussion
Calculated Column not working with measures
- 6 years ago
Hi Anonymous ,
Using the blog post below I was abble to achieve necessary value:
https://www.proserveit.com/blog/ms-power-bi-topn-and-other
Only change was that I created the Top5 and others on the query editor since it was giving me a circularity from dax.
You can also make this even more dinamic if you place the Top N as a what if parameter.
Check PBIX file attach.
Hi Anonymous ,
You cannot use measures on a calculated column try the following:
- Create a table with the following format
DescriptionRank
| P1 | 1 |
| P2 | 2 |
| P3 | 3 |
| P4 | 4 |
| P5 | 5 |
| Others | 6 |
- Then use the following code for a measure to place in pie chart:
Pie Chart = SWITCH(TRUE(); SELECTEDVALUE('Ranking'[Rank]) = 6 ;CALCULATE([Days_Mea];FILTER('Table';[Rank] >= SELECTEDVALUE( 'Ranking'[Rank])));CALCULATE([Days_Mea];FILTER('Table';[Rank] = SELECTEDVALUE( 'Ranking'[Rank]))))
Now create your chart with measure created above in the values and Description of the table created in the legend.
Check result in PBIX attach.
Thanks - unfortunately I would not be able to use alias P1, P2, etc in the visual it would need to be the Project Name.
- MFelix6 years agoSuper User
Hi Anonymous ,
Do you need this visual to be interactive with other selections? Like dates, users, whatever?
The calculated column is doable however is not dinamic, you can also use a summarized table, once again depending on the filters you need the interaction with other visual is limited.
- Anonymous6 years agoNot applicable
We filter by date period, Team, Product, Release and Project so there is alot going. It doesn't seem like this will be possible to do.
- MFelix6 years agoSuper User
Hi Anonymous ,
Using the blog post below I was abble to achieve necessary value:
https://www.proserveit.com/blog/ms-power-bi-topn-and-other
Only change was that I created the Top5 and others on the query editor since it was giving me a circularity from dax.
You can also make this even more dinamic if you place the Top N as a what if parameter.
Check PBIX file attach.