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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jamesfbeard
New Member

GBP & Eur help

Hello all,

 

I have some cost data stored in a database as numeral values. Alongside it I have categorys whether it is GPB or EURO - i want these categories to determine how the data is viewed on the graph, i.e. if a filter is selected for GPB, the data will show all relevant rows and show the graph as £ and if Euro is selected it will then filter for relevant rows and show data as Euro?

 

Any guidance?

 

James

1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

Ensure your cost data table has a numeric column for costs and a column that indicates the currency category (e.g., "CurrencyType" with values like "GBP" or "EURO").

Go to the Fields pane in Power BI and drag the CurrencyType column to the report canvas to create a slicer. This allows users to select either "GBP" or "EURO."

Create a Measure

DynamicCost = 
VAR SelectedCurrency = SELECTEDVALUE('YourTable'[CurrencyType])
VAR TotalCost = SUM('YourTable'[Cost])
RETURN
SWITCH(
SelectedCurrency,
"GBP", FORMAT(TotalCost, "Currency"),
"EURO", FORMAT(TotalCost, "€#,0.00"),
TotalCost
)

Use a suitable visual (like a bar chart or line chart) and place the DynamicCost measure in the values field.
Add any necessary dimensions (like categories, dates, etc.) to the axis of the graph.

Now, when you select "GBP" or "EURO" from the slicer, the visual should dynamically update to show the costs formatted according to the selected currency.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

View solution in original post

5 REPLIES 5
Kedar_Pande
Super User
Super User

Ensure your cost data table has a numeric column for costs and a column that indicates the currency category (e.g., "CurrencyType" with values like "GBP" or "EURO").

Go to the Fields pane in Power BI and drag the CurrencyType column to the report canvas to create a slicer. This allows users to select either "GBP" or "EURO."

Create a Measure

DynamicCost = 
VAR SelectedCurrency = SELECTEDVALUE('YourTable'[CurrencyType])
VAR TotalCost = SUM('YourTable'[Cost])
RETURN
SWITCH(
SelectedCurrency,
"GBP", FORMAT(TotalCost, "Currency"),
"EURO", FORMAT(TotalCost, "€#,0.00"),
TotalCost
)

Use a suitable visual (like a bar chart or line chart) and place the DynamicCost measure in the values field.
Add any necessary dimensions (like categories, dates, etc.) to the axis of the graph.

Now, when you select "GBP" or "EURO" from the slicer, the visual should dynamically update to show the costs formatted according to the selected currency.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

@Kedar This has worked perfectly and I can see the values are now changing - is there anyway to get it to show the £ or € symbol in the Y axis depending on the slicer selection - or get the title of the graph to dynamically change depending on slicer selection, e.g. "Total Invoice Cost - GBP" when GBP selected or "Total Invoice Cost - EUR" when EUR is selected?

jamesfbeard_0-1729260800784.png

 

Lucas_LP
Resolver I
Resolver I

Create a new DAX column with formatted currency type:

FormattedCurrency = SWITCH(  
    TRUE(),  
    TableName[Territory] = "Euro", FORMAT(TableName[Amount], "€#,##0.00"),  
    TableName[Territory] = "GBP", FORMAT(TableName[Amount], "£#,##0.00"),  
    TableName[Territory] = "USD", FORMAT(TableName[Amount], "$#,##0.00"),  
    FORMAT(TableName[Amount], "#,##0.00")  // Default format  
) 

Of course, replace column and table names accordingly.

Hope it helps!

rajendraongole1
Super User
Super User

Hi @jamesfbeard - Ensure that your data includes a column for currency categories (e.g., "GBP", "EURO") and that your cost values are stored in the same table or a related table.

In Power BI, use the Currency Category column (e.g., "Currency") as a Slicer on your report page. This will allow users to select either GBP or Euro to filter the data accordingly.

 

ref link:

Dynamic Currency Conversion with DAX in Power BI - Ben's Blog (datakuity.com)

Format Currencies In Power BI Using DAX – Master Data Skills + AI (enterprisedna.co)

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.