Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I am trying to change the background color of the cell in each ROW of the highest number. Example, In the second row, the 30% would change color to dark grey in background. This is a matrix visual . Is there a DAX for this?
Solved! Go to Solution.
HI @jcastr02
I opened your file and it was my laptop that was very jammed and crashed, your report is so big.please try this formula:
% of Attribute = divide(calculate(COUNTA('30 Day - Attribute'[Response])),CALCULATE(COUNTA('30 Day - Attribute'[Response]),FILTER(ALLSELECTED('30 Day - Attribute'),'30 Day - Attribute'[Attribute.1]=MAX('30 Day - Attribute'[Attribute.1]))))
Regards,
Lin
I assume Strongly Agree, Agree etc are part of on dim.
Create a measure to have max value at attribute level and use this measure to calculate color.
In the conditional formatting; for each column, go to advance control and choose field and this color measure.
hi @jcastr02
You could create a measure as below:
Ismax = IF( MAXX(ALLSELECTED('Table'[Response]),[Measure])=[Measure],1,0)
Note: [Measure] is the measure in your current matrix
Then do the conditional formatting as below:
Result:
and here is sample pbix file, please try it.
Regards,
Lin
Hi @v-lili6-msft I don't have a measure in my current matrix - I am just taking a count of the responses and showing as % of total from row. Will that be a problem?
hi @jcastr02
[Attribute.1] is a Text value, you couldn't use SUM for it, you need use COUNT instead.
And if you still have the problem, please share a simple sample pbix file for us have a test. that will be a great help for this simple case.
Regards,
Lin
https://1drv.ms/u/s!Ava_12t7CNJtkCGALXOtGpymk1pF
@v-lili6-msft see the 30 day Feedback Tab, table is on bottom
HI @jcastr02
I opened your file and it was my laptop that was very jammed and crashed, your report is so big.please try this formula:
% of Attribute = divide(calculate(COUNTA('30 Day - Attribute'[Response])),CALCULATE(COUNTA('30 Day - Attribute'[Response]),FILTER(ALLSELECTED('30 Day - Attribute'),'30 Day - Attribute'[Attribute.1]=MAX('30 Day - Attribute'[Attribute.1]))))
Regards,
Lin
hi @jcastr02
You could just create a measure as below
This measure is the logic of 'showing as % of total from row':
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |