Forum Discussion

modwonka's avatar
modwonka
Icon for Helper I rankHelper I
4 years ago

Show value with a If with three conditions

Hi,

I guess this is so easy but I don't know how to do it. If anyone can help me, I would appreciate it.

 

I wanna filter one Scatter plot graphic through one slicer. Easy. My problem is I would like to have three measures in one. 

 

I have this code, but I don't know how to finish my measure to show one of the var when I filter:

 

Measure = 

var One =
DIVIDE(
    CALCULATE(
        [Sales],
        KEEPFILTERS(Example[Channel] = "One")
    )
    ,
[Sales One]
)

var Two =
DIVIDE(
    CALCULATE(
        [Sales],
        KEEPFILTERS(Example[Channel] = "Two")
    )
    ,
[Sales Two]
)

var Total =
DIVIDE([Sales], [Sales Total])

return IF(
SELECTEDVALUE(
...)

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi modwonka ,

     

    When will return the variable "Total" data? 

     

    var Total =
    DIVIDE([Sales], [Sales Total])

     

    If you want to match variable-one/ variable with the selection in slicer, please try:

     

    Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

     

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi modwonka ,

     

    Any updates?

     

    Best Regards,
    Eyelyn Qin