Forum Discussion
POWER BI MATRIX
- Anonymous2 years ago
Hi BIswajit_Das ,
Sorry for being late, please change the DAX into this:Measure = var _tab=SUMMARIZE(ALLSELECTED('Sheet18'[RES]),'Sheet18'[RES], "@sumvalue",CALCULATE(COUNT(Sheet18[NUM]))) var _max= maxx( _tab,[@sumvalue]) var _area=SELECTEDVALUE('Sheet18'[RES]) return SWITCH(TRUE(),COUNT('Sheet18'[NUM])=_max&&_area="a","Blue", COUNT('Sheet18'[NUM])=_max&&_area= "b","Black",COUNT(Sheet18[NUM])=_max&&_area="c","Yellow")The final output is below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello amitchandak thanks for responding.
But If possible can you give an example regarding this query
i. e How to add color formating on a matrix based on the above senario.
Thanks & Regards...
Hi BIswajit_Das ,
Please refer to the steps:
I create a measure by using this DAX:
Measure 2 = var _tab=SUMMARIZE(ALLSELECTED('Table (2)'[area]),'Table (2)'[area], "@sumvalue",CALCULATE(SUM('Table (2)'[value])))
var _max= maxx( _tab,[@sumvalue])
var _area=SELECTEDVALUE('Table (2)'[area])
return SWITCH(TRUE(),sum('Table (2)'[Value])=_max&&_area="a","Blue", sum('Table (2)'[Value])=_max&&_area= "b","Black",sum('Table (2)'[Value])=_max&&_area="c","Yellow")
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- BIswajit_Das2 years ago
Impactful Individual
HelloAnonymous
Thanks for responding but can you edit the measure for this data
PCNONUMRES1 1 A 1 2 A 1 3 B 1 4 A 2 5 B 2 6 C 2 7 A 2 8 B 3 9 C 3 10 A 3 11 C 3 12 C here the measure is like
i.e
In rows - pcnocolumns - res
values - count(num)
Thanks & regards..- Anonymous2 years agoNot applicable
Hi BIswajit_Das ,
Sorry for being late, please change the DAX into this:Measure = var _tab=SUMMARIZE(ALLSELECTED('Sheet18'[RES]),'Sheet18'[RES], "@sumvalue",CALCULATE(COUNT(Sheet18[NUM]))) var _max= maxx( _tab,[@sumvalue]) var _area=SELECTEDVALUE('Sheet18'[RES]) return SWITCH(TRUE(),COUNT('Sheet18'[NUM])=_max&&_area="a","Blue", COUNT('Sheet18'[NUM])=_max&&_area= "b","Black",COUNT(Sheet18[NUM])=_max&&_area="c","Yellow")The final output is below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.