Forum Discussion
Dax comparision not working
- 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 regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
Hi selimovd ,
Thank you for your reply !
Iam using the column so that I could use it in conditional formatting for the table .
I have created the table to show all the values of Screen 1 Top Level and based on the value of the new column., iam giving the colour formatting to the table values.
I tried creating measure too but it gives an error.Can you suggest me any other tips or tricks.
Thanks,
Sai Priya.
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
)