Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

switch two columns with two slicers

Hi, here is a complcated problem that with two slicers

here is the data and relative slicers:

 

when I select values from slicer1, sum the value from cal1,

and when I select values from slicer2, sum the value from cal2,

when I select both slicer1 and slicer2, sum the value from cal1.

so how can I create such a calculation get the result value, do you have any good ideas?

Thank you.

 

 

  • Hi Anonymous ,

     

    Please close the interaction between the two slicers. Then use the following measure to calculate.

     

    Measure =
    IF (
        ISFILTERED ( data[dim1] ),
        SUM ( data[cal1] ),
        IF ( ISFILTERED ( data[dim2] ), SUM ( data[cal2] ) )
    )
    

     

    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.

     

1 Reply

  • v-kkf-msft's avatar
    v-kkf-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    Please close the interaction between the two slicers. Then use the following measure to calculate.

     

    Measure =
    IF (
        ISFILTERED ( data[dim1] ),
        SUM ( data[cal1] ),
        IF ( ISFILTERED ( data[dim2] ), SUM ( data[cal2] ) )
    )
    

     

    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.