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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Change values in chart/tables depending on the currency selected in a slicer

Hello all,

 

I have a table (Consolidated) with following column names:

PnL Screenshot.png

The values that show up in monthly columns are all in local currencies based on the info in 'Region' column. For example, IN=INR;  AU=AUS; US=USD.

 

I have created different reports (visualization views) based on above data set by pivoting/unpivoting the above table and saving them as different tables/queries in PowerBI.

 

Question: Could someone please help me incorporate in each of the reports view a slicer based currency having INR, USD, AUS, GBP so that whichever currency is selected in the slicer, all "values" in report/table/charts is updated to reflect in the selected currency? 

 

I tried looking up an answer to a similar issue in the community but was unable to do so. 

 

Thank you for your help in advance.

-Deepak.

 

1 ACCEPTED SOLUTION

Hi,

 

You may download my solution file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

14 REPLIES 14
Anonymous
Not applicable

Here is the table.

PnL Line ItemsComparison BucketYearJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberTOTALRegionCountryCurrencyBiz Units

Revenue2017 Actuals201719498.0522400.6725735.5126394.1520269.0935824.0119893.8522559.8814377.863333220.4622766.622530500.0646293440.2AsiaININRABC
Direct Costs2017 Actuals201700000233.9294.7297.1484.5678.3455.210003443.7AsiaININRXYZ
Gross Margin2017 Actuals20170000000000000AsiaININRDEF
Staff Costs2017 Actuals2017190.4217.5267.1263.500000000938.5AsiaAUAUSABC
IT Costs2018 Actuals201877.2148.593.744.4335.8389.4177.3318.7639.3313.6124.8560.13222.8AsiaAUAUSABC
Rental Costs2018 Actuals20181546.815081489.11491.41486.11590.215571566.81603.93118.52220.52574.821753.1North AmericaUSUSDDEF
PBT2018 Actuals2018201.25528.79996846.8999329.35823.1600.4190.9503.4356.9499511461.6999502.199944533.7999115878.749North AmericaUSUSDXYZ
Revenue2018 Original Budget20181309.7021912.988966.03166358.51-2343.161490.5622515.804937.81251949.5135181550.3782651.737077717.551127017.43North AmericaUSUSDABC
Direct Costs2018 Original Budget2018518.492518.75197519.896781.17553.046527.436530.556537.42537.3159688546.494541.839968568.1779676680.596AsiaININRDEF

Hi,

 

I may be able to help if you can share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish, Thank you for your reply. Below is a link to download the file. https://1drv.ms/u/s!AuBrtdjpYsBqgQYcuO9HPmC-Fx8z This is a sample file I have created. Thank you for your help. Deepak.

Hi,

 

What is the Consol Table?  Has this Table been created after consolidating data from the other 3 Tables?  Is that the only Table from you will be building all your visuals?  I may be able to help (not sure how much i can though) but i want to try.  I need to carry out some transformations in the Query Editor.  Share the 4 base data sets in an MS Excel file format.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish,

 

The consol tab is the main table which was loaded in Power BI. This table was created by getting data from different excel files/different tabs. The underlying data I received was in this format.

The rest of the tables in Power BI Desktop or the attached excel sheet you see are the transformations I did in Power BI.

 

For my visuals am using the following three tables only:

By Comparison Buckets

By PnL Line Items

By Months

 

Below is the link to download the excel file.

https://1drv.ms/x/s!AuBrtdjpYsBqgQcbU4q_p-7H4fXj

 

I sincerely appreciate all your assistance.

Many thanks,

Deepak.

Hi,

 

You may download my solution file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish,

 

Thank you so much for all your help. This answers my query but not completely.

Unfortunately, am unable to share my dataset to explain you better but I sincerely appreciate all your efforts.

 

Why I say not completely is because, if I have in my dataset INR, AU, US, data values I also want to be able to see data values in GBP or some other currency for that matter. 

 

And the next thing was that my visualizations are already created using not the "main table" I sent you, but the other tables in excel file I sent you. So how to create measures in those respective table to get the desired result in visualizations is a challenge for me. 

 

Many thanks once again for all your assistance.

 

-Deepak.

You are welcone.  The first problem of viewing amounts in othe currencies can be solved.  Your method of creating visualisations from the 3 break-out tables would be an inefficient one because those tables have infact been created from the main table (on which my solution is based).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish,

 

Re: the 3 break-out tables - I have created them because I wanted to use specific visual charts.

 

As per my understanding on BI, certain visual charts can be used when your data is in a particular format. Am not sure if this is true but if  you are aware of how the data can be in one format only yto support multiple visualizations, I would love to learn more about that. 

 

The visualization I had sent you in the sample file was just one visual. 

 

Thanks once again for all your help.

-Deepak.

Build your desired visuals from my single Table.  Let me know which visual you are unable to build because of the data structure of the single Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hello Greg/Anish,

So sorry, this is my first time on the forum posting the query. It did not strike me to actually attach the file. My bad.

 

I have the following tables in my Power BI Desktop:

  1. Table "Consolidated" - This is the only dataset in my excel file, (this excel file is loaded into BI Desktop) and the rest of the below tables are in Power BI Desktop.
  2. Table By "Comparison Buckets" (pivoted view,  using query editor)
  3. Table "By PnL Line items" (pivoted view, using query editor)
  4. Table "By Months" (Un-pivoted view, using query editor)

Based on the above tables in Power BI Desktop I have created visualizations. Basically different report tabs are referring to one table at a time.

 

Could you please guide me on how to incorporate in each of the reports view, a slicer having currency such as INR, USD, AUS, so that whichever currency is selected in the slicer, "all values" in the report/table/charts is updated to reflect the selected currency? 

See the attached image for result. Right now in the picture I can see all local currencies listed in the slicer and based on the selection it will filter the chart to show only figures respective to the selected currency. I want to know if there is a way to get "all values" converted in one standard currency depending on the currency selected in the slicer. It should show me all values and not just thosoe values which are related to INR, AUS or USD only.

 

Am unable topost the table in this post will post the table in another post.

 

Exchange Rate:

1 USD=1 USD

1 USD=67 INR

1 USD=30 AUS

1 USD=0.76 Sterling Pound

 

Thank you so much for your help.

-Deepak.

Ashish_Mathur
Super User
Super User

Hi,

 

What exachange rate should be used for each currency - Exchange rates will fluctuate everyday.  Share data in a format that can be copied in an Excel workbook.  Also, show your expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

So, sample data that can be copied and pasted would be very helpful. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Also, if you could include how your data actually ends up after unpivoting, etc. that would save a lot of time.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hello Greg,

 

So sorry, this is my first time on the forum posting the query. It did not strike me to actually attach the file. My bad. Also I was not aware how to send sample data. 

 

I have the following tables in my Power BI Desktop:

  1. Table "Consolidated" - This is the only dataset in the excel file, (this excel file is loaded into BI Desktop) and the rest of the below tables are in Power BI Desktop.
  2. Table By "Comparison Buckets" (pivoted view on 'Value', using query editor)
  3. Table "By PnL Line items" (pivoted view on 'Value', using query editor)
  4. Table "By Months" (Un-pivoted view on 'Months', using query editor)

Based on the above tables in Power BI Desktop I have created visualizations. Basically, different report tabs are referring to one table at a time.

 

Could you please guide me on how to incorporate in each of the reports view, a slicer having currency such as INR, USD, AUS, so that whichever currency is selected in the slicer by the user, "all values" in the report/table/charts is updated to reflect the selected currency? 

 

Thank you so much for your help.

-Deepak.

 PnL Line ItemsComparison BucketYearJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberTOTALRegionCountryCurrencyBiz Units

Revenue2017 Actuals201719498.0522400.6725735.5126394.1520269.0935824.0119893.8522559.8814377.863333220.4622766.622530500.0646293440.2AsiaININRABC
Direct Costs2017 Actuals201700000233.9294.7297.1484.5678.3455.210003443.7AsiaININRXYZ
Gross Margin2017 Actuals20170000000000000AsiaININRDEF
Staff Costs2017 Actuals2017190.4217.5267.1263.500000000938.5AsiaAUAUSABC
IT Costs2018 Actuals201877.2148.593.744.4335.8389.4177.3318.7639.3313.6124.8560.13222.8AsiaAUAUSABC
Rental Costs2018 Actuals20181546.815081489.11491.41486.11590.215571566.81603.93118.52220.52574.821753.1North AmericaUSUSDDEF
PBT2018 Actuals2018201.25528.79996846.8999329.35823.1600.4190.9503.4356.9499511461.6999502.199944533.7999115878.749North AmericaUSUSDXYZ
Revenue2018 Original Budget20181309.7021912.988966.03166358.51-2343.161490.5622515.804937.81251949.5135181550.3782651.737077717.551127017.43North AmericaUSUSDABC
Direct Costs2018 Original Budget2018518.492518.75197519.896781.17553.046527.436530.556537.42537.3159688546.494541.839968568.1779676680.596AsiaININRDEF
Gross Margin2018 Original Budget20183378.4245404.2713899.5224126.1696777.072-617.7641023.9381864.391608.4642627704.7673561.080755419.0090344149.34AsiaAUAUSXYZ
RevenueQ0 2018  Revised Budget2018765.3027532.19575798.8921014.392778.3481574.2313321.3441115.3981030.5895891074.827552.206584484.92281712042.65North AmericaUSUSDABC
Direct CostsQ0 2018  Revised Budget201844.1047160.8182511135.028241.1017599.6313544.5245-80.4139205.1926-20.0492705418.6723722.443399290.4352444161.489AsiaININRDEF
Gross MarginQ0 2018  Revised Budget20181309.7021912.988966.03166358.51-2343.161490.5622515.804937.81251949.5135181550.3782651.737077717.551127017.43AsiaAUAUSXYZ
RevenueQ1 2018 Revised Budget2018518.492518.75197519.896781.17553.046527.436530.556537.42537.3159688546.494541.839968568.1779676680.596North AmericaUSUSDABC
Direct CostsQ1 2018 Revised Budget20183378.4245404.2713899.5224126.1696777.072-617.7641023.9381864.391608.4642627704.7673561.080755419.0090344149.34AsiaININRDEF
Gross MarginQ1 2018 Revised Budget2018765.3027532.19575798.8921014.392778.3481574.2313321.3441115.3981030.5895891074.827552.206584484.92281712042.65AsiaAUAUSXYZ
RevenueQ2 2018 Revised Budget201844.1047160.8182511135.028241.1017599.6313544.5245-80.4139205.1926-20.0492705418.6723722.443399290.4352444161.489AsiaAUAUSABC
Direct CostsQ2 2018 Revised Budget20181309.7021912.988966.03166358.51-2343.161490.5622515.804937.81251949.5135181550.3782651.737077717.551127017.43AsiaININRDEF
Gross MarginQ2 2018 Revised Budget2018518.492518.75197519.896781.17553.046527.436530.556537.42537.3159688546.494541.839968568.1779676680.596North AmericaUSUSDXYZ

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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