Forum Discussion
dashboard-1
5 years agoNew Member
Formatting Y-axis
Hi all, I have been trying to add a € sign before a value, based on a slicer selection. To do this, I created a measure and used the function FORMAT(x, €#.##). However, it gives me an error. ...
- 4 years ago
Hi, dashboard-1 ;
IF you want show in graph, you could create two measures ,because one measure only show one type unless use format. so please try two measures:
Dynamic Display1 = VAR selectitem = IF ( HASONEVALUE ( Selector[Type] ), VALUES ( Selector[Type] ), BLANK () ) RETURN SWITCH ( selectitem, "Cost", SUM ( [Cost] ) )Dynamic Display2 = VAR selectitem = IF ( HASONEVALUE ( Selector[Type] ), VALUES ( Selector[Type] ), BLANK () ) RETURN SWITCH ( selectitem, "number", SUM ( [number] ), BLANK () )Then change measure1 type
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
selimovd
5 years agoMost Valuable Professional
Hey dashboard-1 ,
the format itself has to be in quotes.
Try it like this:
FORMAT(x, "€#.##")
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
- dashboard_15 years agoFrequent Visitor
Hi,
Thanks for your reply.
I'm trying to convert to a currency when cost is selected at the slicer. The full formula is:
Dynamic Display =var selectitem=IF(HASONEVALUE(Selector[Type]),VALUES(Selector[Type]),BLANK())returnSWITCH(selectitem,"Cost",FORMAT([Cost],€#.##),"number",[number],BLANK())This is working in a table, but not a graph.So, with a slicer you can select what value, cost or number, will be shown in the graph.
The only problem is, that by using FORMAT, the number will go to a text value. And a text value will not be shown in a graph.
I also tried the CURRENCY function, but that is not doing anything.I hope you can help me... If you choose cost, then the value needs to convert to currency. If you choose number, the value needs to convert to double.Best regards,Kelly