The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I wanted to add "$" & "€" prefix in sales field that changes according to the currency filter selected by user ($ if USD is selected, € if EUR is selected)
Any suggestion or help would be helpful to me. Thanks.
Try this way:
1) Add a new column for Amount in Euros which will do the calculation by picking the amount in USDs
2) Unpivot it so that a table will have both the values(in USDs and EUROS)
3) Create an independent table for slicer selection which you need to join with others
4) Use that table for having a slicer.
Sample file attached here
Thanks for your reply but this will not work in case of bar chart because the result is text and we are loosing the knowledge of the value.
I want this to be done in case of bar chart showing sales of different products.
Hello @Anonymous ,
In the above solution given by @PC2790 , please change datatype of Values column to Decimal format, and you should be good to go.
As you need to show values in bar chart, I would suggest you to go with this approach instead of prefixing Currency symbol in starting.
Cheers,
Shishir
so there is no way I can show dynamic currency prefix with the value in bar chart?
As a workaround you can create a measure to have dynamic header according to the slicer selection of the currenycy
For Eg, when you select USD, the header should show "Value in USD"
Or see if these videos from Gy in a cube turns out to be helpful:
Dynamically change chart axis in Power BI - YouTube
Dynamic titles with multiple slicers or filters in Power BI - YouTube
Hello @Anonymous ,
Please add a independent table with name CurrencyType having two values as type- Euro and Dollar.
Use this feild in slicer.
Lets assume that you have measure which gives you amount/sales column as Measure1.
Use below measure for dynamically switching Dollar and Euro based on selction.
Measure = Switch(Selectedvalue(CurrecnyType[Currency]),"Euro",FORMAT([Measure1],"€#.00"),"Dollar",FORMAT([Measure1],"$#.00"))
Please mark it as answer if it solves your issue. Kudos are also appreciated.
Cheers,
Shishir
Thanks for your reply Shishir but this will work only in table or matrix, I won't be able to use this for charts. This is becasue the result is text, we are loosing the knowledge of the value.
I want this to be done for a bar chart.