Forum Discussion
Conditional Formatting Matrix Columns
Hello,
I am trying to figure out if there is a way to use conditional formatting to go on the basis of the column, rather than the entirety of the matrix.
For example, when I use the Lowest value to Highest value format, it will compare the values of the whole table, when I’d like the conditional formatting to compare lowest to highest of only the values in columns.
Thank You for your help,
- Anonymous9 years ago
Conditional formatting applies to a range of values in a single column of your original table, when you create a Matrix visual using fields of the original table, all values come from this single column, thus conditional formatting goes on the entirety of the Matrix.
The feature you describe can’t be achievable in Power BI Desktop, you can submit a feature request in the Power BI ideas forum: https://ideas.powerbi.com/forums/265200 .Thanks,
Lydia Zhang
14 Replies
- jnickellHelper V
I found this thread looking for the same conditional formatting color scale "per column".
I thought I was close using RankX to get the format key below, but that still didn't work.
I think that I've found an answer in this youtube video.. https://www.youtube.com/watch?v=wTRrskQzAHk
He brings it together at the end, and it looks to work in my scenario.
__PerMonthColorScale = VAR SummaryTable = CALCULATETABLE( ADDCOLUMNS( SUMMARIZE( Forecasts, Projection_Master[JOBNUMBER_I], Forecasts[TargetMonth] ), "CurrentProjection", [Current Projection] ), ALLSELECTED('Job Summary') ) VAR MaxValue = MAXX( SummaryTable, [CurrentProjection] ) VAR MinValue = MINX( SummaryTable, [CurrentProjection] ) VAR Range = MaxValue - MinValue VAR Hue = Round( DIVIDE( [Current Projection] - MinValue, Range ) * 120,0) VAR Color = "hsla(" & Hue & ", 100%, 50%, 1)" RETURN if (ISBLANK([Current Projection]), BLANK(), color ) - PRodriguezNew Member
Hello,
I am trying to figure out if there is a way to use conditional formatting to go on the basis of the column, rather than the entirety of the matrix.
For example, when I use the Lowest value to Highest value format, it will compare the values of the whole table, when I’d like the conditional formatting to compare lowest to highest of only the values in columns.
Thank You for your help,
- AnonymousNot applicable
Conditional formatting applies to a range of values in a single column of your original table, when you create a Matrix visual using fields of the original table, all values come from this single column, thus conditional formatting goes on the entirety of the Matrix.
The feature you describe can’t be achievable in Power BI Desktop, you can submit a feature request in the Power BI ideas forum: https://ideas.powerbi.com/forums/265200 .Thanks,
Lydia Zhang- AnonymousNot applicable
This is ridiculous, please add this feature.
- AnonymousNot applicable
Hello Lydia,
I have a PBI dashboard where conditional formatting is being applied to a single column of a matrix. In this case, all dollar values < 0 are formatted as white text on red background. I inherited a dashboard and I am struggling to figure out how this is done. I'm totally lost as to how this is implemeted.
- manuelbanzaFrequent Visitor
Hello,
Does anyone know if there is already a solution for the question asked?
Thank you for your help,
- AnonymousNot applicable
I got around this by using the ALLEXCEPT() function a measure. This function will ignore all filters but one, so if you choose the column value as the exception you can use conditional formatting on a column basis.
- lgrogerAdvocate I
Can you provide an example of how you did this?
- lgrogerAdvocate I
If anyone else stumbles across this like me, I voted for this idea
- JonesJonesJonesNew Member
For anyone searching, the below works:
Formatting Measure = RANKX ( ALLSELECTED ( Matrix Rows ), [Matrix Measure], [Matrix Measure], ASC )I don't understand why the measure is in there twice, or what it's doing. But I know it works.
If you have a very narrow range of values, the highlighting effect won't be very pronounced.
- SeanM77Advocate I
FYI this can be done in Tableau
- Siddhesh_PRegular Visitor
To attain this objective, utilize conditional formatting that relies on the proportion of a measure's contribution to the overall total, rather than the raw measure itself. This ensures that the column formatting is determined by values always ranging between 0 to 1, as depicted in the image.
The dax for achieving this is as follows:
Month wise Qty Contribution =Var _qty = [Qty]VAR _total_qty =CALCULATE([Qty],ALL('Calendar'[Month]))RETURNDIVIDE(_qty, _total_qty)