Forum Discussion
lucamilanesi
6 years agoFrequent Visitor
Using a text measure as a legend
Hello everyone, I'd need your help: I created the measure "Measure_Level_Asset". Misura_Livello_Asset = IF(GOV_Asset[Misura_Rischio_Residuo_Asset]<1,"Azzurro",IF(GOV_Asset[Misura_Rischio...
- 6 years ago
Hi lucamilanesi
You cannot create calculated column based on measures.This process may be a little complicated, but it can solve your problem.
1. Create a table with "Azzurro", "Verde", "arancione", "Rosso",Then you can use this column in the legend fields.2.Create four separately measures for “ Azzurro” and “ Verde” and “ Arancione” and “ Rosso”. Add these two measures into Values section of the chart.DAX is like this:num_Azzurro = COUNTROWS( FILTER(ALL('GOV_Asset'), [Misura_Livello_Asset] = "Azzurro" ) ) num_selection = var _nv = SELECTEDVALUE('Table'[Column1]) return SWITCH(_nv,"Azzurro",[num_Azzurro])You can refer to this .pbix.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lucamilanesi
6 years agoFrequent Visitor
Thank you for your interest V-lianl-msft
This table is formed by the measure "Measure_Level_Asset", the content is the one in evidence (names of colors). Each asset is identified by a color (which may vary depending on the value assigned to the various parameters). In fact, this measure is dependent on another measure.
I hope I have provided useful information.
V-lianl-msft
Community Support
6 years agoHi lucamilanesi
You cannot create calculated column based on measures.This process may be a little complicated, but it can solve your problem.
1. Create a table with "Azzurro", "Verde", "arancione", "Rosso",Then you can use this column in the legend fields.
1. Create a table with "Azzurro", "Verde", "arancione", "Rosso",Then you can use this column in the legend fields.
2.Create four separately measures for “ Azzurro” and “ Verde” and “ Arancione” and “ Rosso”. Add these two measures into Values section of the chart.
DAX is like this:
num_Azzurro = COUNTROWS(
FILTER(ALL('GOV_Asset'),
[Misura_Livello_Asset] = "Azzurro"
)
)
num_selection =
var _nv = SELECTEDVALUE('Table'[Column1])
return SWITCH(_nv,"Azzurro",[num_Azzurro])You can refer to this .pbix.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.