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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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