Forum Discussion
Anonymous
5 years agoNot applicable
DAX Help needed
I have dashboard which has different DAX . One of the DAX is IF ELSE condition ,also has silcer on top of it. The intial values are ( 1,2) when flag applied as "No" . and there are cerntain value...
- 5 years ago
Hi Anonymous ,
Knidly check if the attachment is what you want.
Measure = SWITCH ( SELECTEDVALUE ( Flag[Flag] ), "No", SUM ( 'Table'[Value] ), "Yes", IF ( SELECTEDVALUE ( 'Table'[Dimension] ) IN { "A", "C" }, 2, SUM ( 'Table'[Value] ) ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
5 years agoSuper User
Anonymous , Your measure is not very clear. But you can create a color measure and use that with Conditional formatting after choosing the "Field Value" option
Colour =
SWITCH(TRUE(),
Table[Date] < TODAY(), "red",
Table[Date] = TODAY(), "orange",
"green")
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
Check
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values