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
Amar-Agnihotri
Resolver I
Resolver I

Slice value is not working with IF condition in a measure

Hello All,
I have a slicer and taking that value into a measure to use further in calculating another measure. Example - Slicer will have USD, GBP, EUR and trying getting sales*currenyrate based slicer selection, but som how it is not working me as expected.
Measure - if(slicer='"EUR",sales*currencyrate,0), I am getting 0 as output. If i remove IF condition of slicer check, it is giving me some result instead of 0, why this happens, how can i achive the expected result.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Amar-Agnihotri ,

 

According to your description, the error may be caused by the inconsistency between the format in the slicer field and the format in the judgment condition. I did a test, the reference is as follows:

vhenrykmstf_0-1629102003670.pngvhenrykmstf_1-1629102025114.pngvhenrykmstf_2-1629102046986.png

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Amar-Agnihotri ,

 

According to your description, the error may be caused by the inconsistency between the format in the slicer field and the format in the judgment condition. I did a test, the reference is as follows:

vhenrykmstf_0-1629102003670.pngvhenrykmstf_1-1629102025114.pngvhenrykmstf_2-1629102046986.png

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Samarth_18
Community Champion
Community Champion

Hi @Amar-Agnihotri ,

 

Can you check if your column which you are using contains blank space before or after your data or you can directly put trim when you taking slicer value in the variable like below:-

measure = 
var _slicer_value = TRIM(SELECTEDVALUE('Table'[Coulmn]))

 

Thank you,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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
Top Kudoed Authors