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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rbiswas
Frequent Visitor

Return the selection of slicer/fliter to use it for calculation/

Hi All,

 

Suppose i have a Column named as "country and another column "Sales value". For all the country, i have "Sales values" in Dollar.

 

I want that if i apply a filter for a specific country, it should shows the "Sales value" in terms of the local currency by applying appropriate exchange rate. 

 

But, when nothing is selected in the filter, the net "Sales Values" i.e in global level should be shown in "Dollar.

 

Right now the problem is I made a column "Sales Value Local Curr"=Sales Value*Exchange rate. When filter is applied, the output shows the net value as needed. But, if nothing is selected, then it simply summed up all the values, which is wrong since the values correspond to different currency for different country.

 

Capture.PNG

 

 

1 ACCEPTED SOLUTION
Datatouille
Solution Sage
Solution Sage

Hi @rbiswas

 

Supposing your table is named 'Sales'

Try this measure:

 

[Total Sales] = IF( Hasonevalue('Sales'[Country]) , Sum('Sales'[SalesValues(Local)]) , Sum('Sales'[SalesValues(Dollar)]) ) 

View solution in original post

2 REPLIES 2
Datatouille
Solution Sage
Solution Sage

Hi @rbiswas

 

Supposing your table is named 'Sales'

Try this measure:

 

[Total Sales] = IF( Hasonevalue('Sales'[Country]) , Sum('Sales'[SalesValues(Local)]) , Sum('Sales'[SalesValues(Dollar)]) ) 

Thanks for the solution, it works 

 

One more question, is it posssible to return the selection data from the filter, since initially we were planning to implement the same using the data selected in filter

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors