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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jeanL
Helper I
Helper I

Create slicer on calculated column

Hello 

 

I am trying to have a slicer which display based on the ratio_teu.

However, the default slicer creation has an in between / range. 

I learnt somewhere that it can be done with What -If Parameter slicer and i manage to do it with measures.

But this ratio_teu is a calculated column and i wasnt sure how to connect this to the what if slicer. 

 

col.PNG

1 ACCEPTED SOLUTION

Hi @jeanL ,

 

If you are summing column [ratio_teu%] in the visual,

 

vkkfmsft_1-1643787318087.png

 

then please try the following formula.

 

Measure2 = 
COUNTROWS (
    FILTER (
        SUMMARIZE (
            vendor_final,
            vendor_final[p2p_pair],
            vendor_final[vendor_master_name],
            "_sum", SUM ( vendor_final[ratio_teu%] )
        ),
        [_sum] >= 'Min. Contribution %'[Min. Contribution % Value]
    )
)

vkkfmsft_0-1643787270220.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

3 REPLIES 3
amitchandak
Super User
Super User

@jeanL , A column can be used in the slicer and you can use the range option.

If you need what that you can use what if values in filter clasue

 

example  measures

countrows(filter(Table, Table[Column] = [what if measure]))

 

measure  =

var _min = minx(allselected(whatif), whatif[Value])

var _max = maxx(allselected(whatif), whatif[Value])

return

countrows(filter(Table, Table[Column] <= _max &&Table[Column] >= _min   ) ) 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI @amitchandak 

 

I tried the solution you have shared. 

 

measures = countrows(filter(vendor_final, vendor_final[ratio_teu%] >= 'Min. Contribution %'[Min. Contribution % Value]))
 
but it does not seem to link as i intend. i would like to filter the rows  where if the ratio is at least the minimum in the slicer. some which are greater than the value in the slicer was not counted. 
col2.PNG

Hi @jeanL ,

 

If you are summing column [ratio_teu%] in the visual,

 

vkkfmsft_1-1643787318087.png

 

then please try the following formula.

 

Measure2 = 
COUNTROWS (
    FILTER (
        SUMMARIZE (
            vendor_final,
            vendor_final[p2p_pair],
            vendor_final[vendor_master_name],
            "_sum", SUM ( vendor_final[ratio_teu%] )
        ),
        [_sum] >= 'Min. Contribution %'[Min. Contribution % Value]
    )
)

vkkfmsft_0-1643787270220.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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