There are situation when you want to display dynamic text in
Power BI based on the selection made on any of the visuals. This can be easily
achieved using ‘Card’ visual and DAX statement.
In the following sample I want to show the selected country
in the Visual and if no country is selected it should show as ‘All Selected’.
Steps:
- Create a 'New Measure' by right clicking on needed fact or dimension on the right pan. I have create mesaure in DimSalesTerriorty.
- Write this expression in the Measure
Measure = "Country Name : " & IF(DISTINCTCOUNT(DimSalesTerritory[SalesTerritoryCountry]) > 1,"All Selected", FIRSTNONBLANK(DimSalesTerritory[SalesTerritoryCountry], "")) - And you are done. Just select the 'Card' visual and select this newly created visual.
Happy Coding!
Informative blog. Thank you for sharing with us.
ReplyDeleteMS Power BI Training in Hyderabad
Thanks for your post
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis is really great informative blog. Keep sharing.
ReplyDeleteMS Power BI Online Training
Power BI Online Training
Power BI Training
Power BI Training in Hyderabad
MS Power BI Training in Hyderabad
ReplyDeleteI like your post very much. It is very much useful for my research. I hope you to share more info about this. Keep posting!!
Best SQL server Training Institute
Very informative blog and useful article thank you for sharing with us , keep posting learn more about. Awesome post...
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training