Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone
I'm trying to apply conditional formatting to an array depending on the values displayed (more negative values will be red and moving green as the values become more positive). However, conditional formatting is applied on all columns and I would like this comparison to be displayed in the array. Is there any way to do this?
This is the table I have. I would like to display the color format (red - green) for the delta vs Reference variable for each of the swatches. However, when I apply conditional formatting, the color is applied by comparing all swatches (since the variable is the same). Is there a way to break it by column (shown as in the table below)?
Thank you
Laura
Hi @LauraBueno ,
Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
Hi @LauraBueno ,
Did you choose the right field to set conditional format? You may select on the [delta vs Reference], right-click or select the down-arrow next to the field in the Values well that you want to format. Select Conditional formatting, and then select the type of formatting to apply.
For reference:
Use conditional formatting in tables
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could achieve close to what you want by creating a rank measure that ranks within each Sample, and using that RANK measure as the value for the conditional formatting. So your table would be formatted with 4 different colour rather than a relative scale. So you could easily see which row in each column/array is the highest and lowest, but not easily see by how much they differ.
Here's one resource for RANKX, but there's lots of ways to use it, including putting it in MEASURE instead of column:
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/
Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos.
I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.
https://sites.google.com/site/allisonkennedycv
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
not sure I got it. But you can create a color measure on dimension values and measure values like this
Color Date = if(FIRSTNONBLANK(Table[date],TODAY()) <today(),"lightgreen","red")
if(FIRSTNONBLANK(Table[Value],"true") "true","green","red")
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")
And this can be used in conditional formatting after selecting "Field". Once you use it one column , it will be there for all samples
refer:
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |