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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Hi69
Frequent Visitor

Switch between currencies and show it in "Analyse in Excel": A table of multiple values ...

Hi, I searched for a combination of my topics but was not able to find the solution for my problem.

 

I have an online connection which I only update frequently where I get several values (e.g. Net sales, different Cost categories) and calculate values on top (e.g. Gross Margin, price and cost per unit).

The values so far only in one base currency.

 

Beside the visuals in the Dashboards also the information can be downloaded for "Analyse in Excel".

 

So far I created a currency table with rates including the base currency with a measure called "Selected currency":

Selected currency = VALUES('Currency'[Currency])
and a slicer to choose the currency.
 

I tested a switch formula which worked very well in the visuals:

Net Sales currency = SWITCH(TRUE(),
[Selected currency]="EUR", [Net Sales SEK]*VALUES('Currency'[Rate]),
[Selected currency]="USD", [Net Sales SEK]*VALUES('Currency'[Rate]),
[Selected currency]="SEK", [Net Sales SEK]*VALUES('Currency'[Rate]))
 
but unfortunately when it comes to "Analyse in Excel" I get the message mentioned in the header:

A table of multiple values was supplied where a single value was expected

What needs to be done to enable the Excel analysis correctly?
Thanks a lot for your help
1 ACCEPTED SOLUTION

Hi  @Hi69 

You can try the following solution.

Selected currency = SELECTEDVALUE('Currency'[Currency])
Then modify the Net Sales currency measure:
Net Sales currency = SWITCH(TRUE(),
[Selected currency]="EUR"[Net Sales SEK]*SELECTEDVALUE('Currency'[Rate]),
[Selected currency]="USD"[Net Sales SEK]*SELECTEDVALUE('Currency'[Rate]),
[Selected currency]="SEK"[Net Sales SEK]*SELECTEDVALUE('Currency'[Rate]))
 
Best Regards!
Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
Hi69
Frequent Visitor

@amitchandak 

Thank you very much for your reply.

Unfortunately it is not working - both are working in the Dashboards (depending on relationship or not) but non of them are finally working in the "Analyse in Excel" file.

Hi  @Hi69 

You can try the following solution.

Selected currency = SELECTEDVALUE('Currency'[Currency])
Then modify the Net Sales currency measure:
Net Sales currency = SWITCH(TRUE(),
[Selected currency]="EUR"[Net Sales SEK]*SELECTEDVALUE('Currency'[Rate]),
[Selected currency]="USD"[Net Sales SEK]*SELECTEDVALUE('Currency'[Rate]),
[Selected currency]="SEK"[Net Sales SEK]*SELECTEDVALUE('Currency'[Rate]))
 
Best Regards!
Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Yes, yes, yes 😄 - that is working.

Thank you so much!

amitchandak
Super User
Super User

@Hi69 , you have to use max/min or related if the is 1-m realtion

 

Net Sales currency = SWITCH(TRUE(),
[Selected currency]="EUR", [Net Sales SEK]*Max('Currency'[Rate]),
[Selected currency]="USD", [Net Sales SEK]*Max('Currency'[Rate]),
[Selected currency]="SEK", [Net Sales SEK]*Max('Currency'[Rate]))

 

 

 

Net Sales currency = SWITCH(TRUE(),
[Selected currency]="EUR", Sumx( Table, [Net Sales SEK]*realted('Currency'[Rate])),
[Selected currency]="USD", Sumx( Table, [Net Sales SEK]*realted('Currency'[Rate])),
[Selected currency]="SEK", Sumx( Table, [Net Sales SEK]*realted('Currency'[Rate])))

 

 

refer few more options

 

currency
https://www.youtube.com/watch?v=4dosxfNxR6M
https://www.sqlbi.com/articles/currency-conversion-in-power-bi-reports/
https://radacad.com/currency-converter-power-bi-function-part-1
https://www.youtube.com/watch?v=Q4hF4CwJsFEhttps://radacad.com/currency-exchange-rate-conversion-in-...
https://businessintelligist.com/2015/03/17/power-bi-tutorial-how-to-implement-currency-conversion-us...
https://blog.beyondimpactllc.com/blog/building-a-dynamic-currency-converter-with-power-bi

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.