Forum Discussion
Visualization id
Hello. Is it possible to get an identifier in DAX visualization? This is necessary to dynamically display the most accurate title for visualization.
4 Replies
- MFelixSuper User
Hi mgusev7 ,
What do you mean by a ID in a DAX visualization?
Visuals on PBI can have the identification you want but it's not automatic the one that is given automatically is based on the selection you make on the visual, not very user friendly, on the measures you only have the name you also define manually.
Regards,
MFelix
- AnonymousNot applicable
Hi, i'm also curious about that case. I have around 14 card visuals placed in some asc order. I would like to have one measure(instead of 14) that would display proper value depending on which card visual it is being display.
Can anyone describe a bit more how visuals in PowerBi can be identified like some id and then if we can use these id in our measure?Any other ideas how it can be solved will be also appreciated.
Thanks
- MFelixSuper User
Hi Anonymous ,
The identification of the visualizations comes from the title or if you don't give any title is a combination of the fields you place in the visualization in case of cards if you select for example the sum of a column the name will be "total column name".
In the case of cards there are two option that you can use to display the values in them the Title and the data label.
The data label cannot be dynamic and is changed by change the text on the fields:
The title by default is blank on thecards but can be changed dinamically based on the function formula you have have on the options:
In order to have this dinamically changed you need to:
- Create a disconnected table with the names that you want to give to each card
Name Title 1
Title 2 Title3 - Create two measures (one for the values and another for the titles:
Values = SWITCH ( SELECTEDVALUE ( TitleTable[Name] ), "Title 1", [Measure 1], "Title 2", [Measure 2], "Title 3", [Measure 3] ) Title = SELECTEDVALUE ( TitleTable[Name] )Now use the Values on the card and the title on the title card, then place the column for the title on the card filters and select the one you want and the value will be updated based on your selection.