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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
powerbidevelope
Frequent Visitor

Country Wise Sales in Local Currency OR USD

Hi All,

 

Please find the data model, i am replicating my business scenario here.

dataset.PNG

 

We need to have country in the slicer, user can select single country or multiple countries.

when user selects single country sales should be displayed in local currency we have seperate column in fact table for local currency aggregatoin. 

when user selects more than one country, sales should be displayed in USD, we have seperate column in fact table for USD currency aggegation.

 

please find the expected result.

 

pbix.PNG

any suggestions are appreciated..

 

Thanks..

1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

Hi @powerbidevelope 

 

try like this:

 

=IF(
    CALCULATE(
        COUNTROWS( Countries ),
        ALLSELECTED( Countries )
     ) =  1,
     SUM( Sales[SalesLC] ),
     SUM( Sales[SalesUSD] )
 )

 


 


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


Proud to be a Datanaut!  

View solution in original post

1 REPLY 1
LivioLanzo
Solution Sage
Solution Sage

Hi @powerbidevelope 

 

try like this:

 

=IF(
    CALCULATE(
        COUNTROWS( Countries ),
        ALLSELECTED( Countries )
     ) =  1,
     SUM( Sales[SalesLC] ),
     SUM( Sales[SalesUSD] )
 )

 


 


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


Proud to be a Datanaut!  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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