Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Deevo_
Resolver I
Resolver I

Currency Symbol not displaying in Card visual with SWITCH statement

I am new to DAX and I have tried to implement solutions on this community forums into my switch statement, but I am not sure where I am going wrong? I believe I must use the FORMAT command, but unsure how to structure this into my switch statement.
 
Below is my selector measure and switch measure that I have created as measures. This "Selector measure" is used as a toggle between the different metrics ($ and FTE). The "Switch Measure" works fine when used in a table/matrix.
 
Many thanks in advance!
 
Problem:
Everytime i switch to the Currency metric, the Symbol does not display as a prefix to the numbers. Can you please help me modify my measures to allow the Currency symbol to display when only the $ metric is selected, and for FTE is just default to no prefix?
 
Other Measures used within the Switch measure:
  • [Costing ($)] =  SUM(Totalcostperproject)
  • [Costing (FTE)] = SUM(TotalFTEperperson)
Selector Measure:  
Selector = UNION(ROW("Type","Hrs."),ROW("Type","Wks."),ROW("Type","FTE"), Row("Type","$."))
Switch Measure:
Cost Selection = var selectitem=IF(HASONEVALUE(Selector[Type]),VALUES(Selector[Type]),BLANK())
return
SWITCH(selectitem,
"$"[Costing ($)],
"FTE"[Costing (FTE)],
BLANK())
1 ACCEPTED SOLUTION

Hi amitchandak, I could not achieve the result I was after in DAX. So instead I used Bookmarks to create two separate versions of the cards, one with the $ measure, and one for the whole number measure. Then added a toggle button to switch between the two bookmarks. Not ideal, but it works for now.

View solution in original post

4 REPLIES 4
Deevo_
Resolver I
Resolver I

Hi amitchandak,

I have been trying to get my head around this, but when trying to add in the FORMAT command into my SWITCH statement, I am not getting the results I am after. All I want to achieve is to display the $ symbol if I toggle the selector to "$", and the other value will be a General Number without any prefixes.

I don't want to create any additional tables.

 

I forgot to mention that in my version of PowerBI Desktop, the "Field parameters" in the "Options" is not available. So I will need a DAX method, if possible.

 

Can you help me to structure my SWITCH statement to add in the FORMAT?

 

Thank you

Deevo_
Resolver I
Resolver I

Hi amitchandak, Thanks for your reply. I will have a play with links you have provided and let you know how I go!

amitchandak
Super User
Super User

@Deevo_ ,Create measure selector using Field Parameters

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi amitchandak, I could not achieve the result I was after in DAX. So instead I used Bookmarks to create two separate versions of the cards, one with the $ measure, and one for the whole number measure. Then added a toggle button to switch between the two bookmarks. Not ideal, but it works for now.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.