Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dax comparision not working

Hi,   Iam performing a calculation in a column which used selectedvalue() dax applied on 3 different filters, but the column result value is not as expected.   I have 3 measures using selectedval...
  • selimovd's avatar
    selimovd
    5 years ago

    Hey Anonymous ,

     

    it would help if you show the approach you tried 😉

    In general you can use a measure for the conditional formatting. A measure just always needs an aggregation.

     

    Maybe try the following measure for your case:

    proposedScreen =
    SWITCH(
        TRUE(),
        MAX( 'Reports vw_Screen1'[Screen 1 Top Level] ) >= [selected1bottom] && MAX( 'Reports vw_Screen1'[Screen 1 Top Level] ) <= [selected1top] && [selectedO1status] = 1, 
        1,
        MAX( 'Reports vw_Screen1'[Screen 1 Top Level] ) >= [selected1bottom] && MAX( 'Reports vw_Screen1'[Screen 1 Top Level] ) <= [selected1top],
        0,
        2
    )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis