Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
arvindyadav
Post Partisan
Post Partisan

Conditional formatting based on date where visual is matrix

Hi Team,

I want to know how to do conditional formatting in power bi when dating in the column where visual is Matrix table.

for example

keyword ABC - is greater than any of date then it turns into dark green if it is lower than the highest one then light green if it is a lower value than among both the date then it converts to red color.

 

I want format like below:

 

Format.PNG

 

 

Thanks,

Arvind

 
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @arvindyadav ,

Try this:

Measure 3 =
RANKX (
    ALLEXCEPT ( 'Table', 'Table'[Account Manager] ),
    CALCULATE ( MAX ( 'Table'[Profit] ) ),
    ,
    DESC,
    DENSE
)

condition.PNG

Hope it helps.

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

19 REPLIES 19
Icey
Community Support
Community Support

Hi @arvindyadav ,

Try this:

Measure 3 =
RANKX (
    ALLEXCEPT ( 'Table', 'Table'[Account Manager] ),
    CALCULATE ( MAX ( 'Table'[Profit] ) ),
    ,
    DESC,
    DENSE
)

condition.PNG

Hope it helps.

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Icey ,

 

Not getting Format.

 

Please find the data. Data 

 

Thanks,

Arvind

I can't open it.

Just open it another tab and see your download.

Just get this:🤔

data.PNG

Try this Data.

If still a problem then please find below data.

 
DateAccount ManagerProfit12/3/2019 0:00Akshay$228.5912/4/2019 0:00Akshay$192.7212/5/2019 0:00Akshay$478.5412/6/2019 0:00Akshay$548.3812/7/2019 0:00Akshay$273.3612/8/2019 0:00Akshay$190.2312/9/2019 0:00Akshay$246.4412/10/2019 0:00Akshay$323.1412/11/2019 0:00Akshay$278.8912/12/2019 0:00Akshay$527.9612/13/2019 0:00Akshay$345.8612/14/2019 0:00Akshay$308.1812/15/2019 0:00Akshay$314.9012/16/2019 0:00Akshay$174.7412/3/2019 0:00Aniket$635.3212/4/2019 0:00Aniket$193.9012/5/2019 0:00Aniket$45.4312/6/2019 0:00Aniket($426.70)12/7/2019 0:00Aniket($452.86)12/8/2019 0:00Aniket($638.41)12/9/2019 0:00Aniket($517.99)12/10/2019 0:00Aniket($385.56)12/11/2019 0:00Aniket($112.62)12/12/2019 0:00Aniket$141.0812/13/2019 0:00Aniket($116.62)12/14/2019 0:00Aniket($79.15)12/15/2019 0:00Aniket($74.40)12/16/2019 0:00Aniket$14.3312/3/2019 0:00Ankita$250.5112/4/2019 0:00Ankita($73.12)12/5/2019 0:00Ankita($201.92)12/6/2019 0:00Ankita($271.08)12/7/2019 0:00Ankita($65.61)12/8/2019 0:00Ankita($228.83)12/9/2019 0:00Ankita($298.71)12/10/2019 0:00Ankita($378.72)12/11/2019 0:00Ankita($200.76)12/12/2019 0:00Ankita($0.42)12/13/2019 0:00Ankita($301.01)12/14/2019 0:00Ankita($238.87)12/15/2019 0:00Ankita($251.17)12/16/2019 0:00Ankita($363.43)12/3/2019 0:00Ashish$5.5212/4/2019 0:00Ashish$4.0912/5/2019 0:00Ashish$8.2012/6/2019 0:00Ashish$3.6812/7/2019 0:00Ashish$4.0912/8/2019 0:00Ashish$6.2612/9/2019 0:00Ashish$2.5712/10/2019 0:00Ashish$4.8812/11/2019 0:00Ashish$0.6012/12/2019 0:00Ashish$1.7812/13/2019 0:00Ashish$1.9212/14/2019 0:00Ashish$1.3512/15/2019 0:00Ashish$3.1512/16/2019 0:00Ashish$2.3512/3/2019 0:00Ashutosh($58.96)12/4/2019 0:00Ashutosh$31.9612/5/2019 0:00Ashutosh($20.61)12/6/2019 0:00Ashutosh($93.45)12/7/2019 0:00Ashutosh($127.50)12/8/2019 0:00Ashutosh($189.78)12/9/2019 0:00Ashutosh$52.1012/10/2019 0:00Ashutosh$36.7612/11/2019 0:00Ashutosh$243.4312/12/2019 0:00Ashutosh$69.4212/13/2019 0:00Ashutosh($43.44)12/14/2019 0:00Ashutosh$19.8312/15/2019 0:00Ashutosh($29.22)12/16/2019 0:00Ashutosh$66.3912/3/2019 0:00Chetanraj$3,119.6012/4/2019 0:00Chetanraj$937.1012/5/2019 0:00Chetanraj$251.1212/6/2019 0:00Chetanraj$136.4312/7/2019 0:00Chetanraj($161.02)12/8/2019 0:00Chetanraj$159.8912/9/2019 0:00Chetanraj($414.70)12/10/2019 0:00Chetanraj$857.1812/11/2019 0:00Chetanraj$2,057.3112/12/2019 0:00Chetanraj$1,150.9112/13/2019 0:00Chetanraj$1,750.2712/14/2019 0:00Chetanraj$1,776.7412/15/2019 0:00Chetanraj$4,366.1212/16/2019 0:00Chetanraj$4,944.5712/3/2019 0:00Harsh$1,478.0512/4/2019 0:00Harsh$1,529.9412/5/2019 0:00Harsh$1,132.9012/6/2019 0:00Harsh$316.9712/7/2019 0:00Harsh$1,001.8212/8/2019 0:00Harsh($20.07)12/9/2019 0:00Harsh$211.6412/10/2019 0:00Harsh$357.8012/11/2019 0:00Harsh($860.59)12/12/2019 0:00Harsh($2,287.41)12/13/2019 0:00Harsh($2,263.09)12/14/2019 0:00Harsh($2,184.81)12/15/2019 0:00Harsh($1,315.67)12/16/2019 0:00Harsh($2,898.14)12/3/2019 0:00Khushboo($24.95)12/4/2019 0:00Khushboo($117.68)12/5/2019 0:00Khushboo($41.82)12/6/2019 0:00Khushboo($33.05)12/7/2019 0:00Khushboo$14.6512/8/2019 0:00Khushboo$0.6512/9/2019 0:00Khushboo($62.40)12/10/2019 0:00Khushboo($80.84)12/11/2019 0:00Khushboo($46.83)12/12/2019 0:00Khushboo($51.32)12/13/2019 0:00Khushboo($3.70)12/14/2019 0:00Khushboo($6.96)12/15/2019 0:00Khushboo($56.23)12/16/2019 0:00Khushboo($8.71)12/3/2019 0:00NA$1.1212/4/2019 0:00NA$14.0712/6/2019 0:00NA$0.6312/7/2019 0:00NA$0.2512/8/2019 0:00NA$0.5012/9/2019 0:00NA$0.2112/10/2019 0:00NA$1.4712/11/2019 0:00NA$2.5012/12/2019 0:00NA$3.5112/14/2019 0:00NA$0.4012/15/2019 0:00NA$0.4412/16/2019 0:00NA$3.7412/3/2019 0:00Prakash($280.39)12/4/2019 0:00Prakash($179.32)12/5/2019 0:00Prakash$12.8312/6/2019 0:00Prakash($17.88)12/7/2019 0:00Prakash($21.50)12/8/2019 0:00Prakash($6.70)12/9/2019 0:00Prakash($8.68)12/10/2019 0:00Prakash($15.54)12/11/2019 0:00Prakash$6.1112/12/2019 0:00Prakash$12.7012/13/2019 0:00Prakash$10.9012/14/2019 0:00Prakash$0.9812/15/2019 0:00Prakash$6.0312/16/2019 0:00Prakash$10.6212/3/2019 0:00Saket($25.82)12/4/2019 0:00Saket($147.45)12/5/2019 0:00Saket($67.66)12/6/2019 0:00Saket$1,718.8812/7/2019 0:00Saket($329.81)12/8/2019 0:00Saket($489.04)12/9/2019 0:00Saket($4.37)12/10/2019 0:00Saket$90.5912/11/2019 0:00Saket$490.8612/12/2019 0:00Saket$306.3312/13/2019 0:00Saket$312.9912/14/2019 0:00Saket$255.5512/15/2019 0:00Saket($235.61)12/16/2019 0:00Saket($338.66)12/3/2019 0:00Shraddha$47.9012/4/2019 0:00Shraddha($25.79)12/5/2019 0:00Shraddha($70.49)12/6/2019 0:00Shraddha($86.03)12/7/2019 0:00Shraddha($64.77)12/8/2019 0:00Shraddha($77.84)12/9/2019 0:00Shraddha($105.88)12/10/2019 0:00Shraddha($111.17)12/11/2019 0:00Shraddha($102.59)12/12/2019 0:00Shraddha($69.55)12/13/2019 0:00Shraddha($70.95)12/14/2019 0:00Shraddha($33.56)12/15/2019 0:00Shraddha($59.84)12/16/2019 0:00Shraddha($93.56)12/3/2019 0:00Virang($69.74)12/4/2019 0:00Virang$38.4312/5/2019 0:00Virang$67.5912/6/2019 0:00Virang($35.59)12/7/2019 0:00Virang$38.0712/8/2019 0:00Virang($259.69)12/9/2019 0:00Virang($168.13)12/10/2019 0:00Virang($59.08)12/11/2019 0:00Virang$2.5612/12/2019 0:00Virang$156.7412/13/2019 0:00Virang$116.7512/14/2019 0:00Virang$33.2012/15/2019 0:00Virang$52.4612/16/2019 0:00Virang$1.27
 

Hi @arvindyadav ,

Please check the attached file.

cond.PNG

 

Best Regards,

Icey

Hi @Icey ,

 

Not worked properly in my case.

not works.PNG

not works.PNG

Icey
Community Support
Community Support

Hi @arvindyadav ,

Try this:

1. Create a measure.

Measure =
IF (
    MAX ( 'Table'[Value] )
        = CALCULATE ( MAX ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Keyword] ) ),
    1,
    IF (
        MAX ( 'Table'[Value] )
            = CALCULATE ( MIN ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Keyword] ) ),
        2,
        0
    )
)

2. Set conditional formatting of Value.

green.jpg

green2.PNG

green3.PNGgreen4.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Icey ,

 

Thanks for your response.

If suppose I want to report for 7 days  11/11/2019, 11/12/2019,11/13/2019, 11/14/2019, 11/15/2019, 11/16/2019, 11/17/2019 then what was my measure and procedure?

 

Thanks,

Arvind.

Hi @arvindyadav ,

For that, can you show me what you want with a screenshot just like what you post before?

 

Best Regards,
Icey

 

Hi @Icey ,

 

I want exactly like this:-

 

Format.PNG

 

Thanks,

Arvind

Hi @arvindyadav ,

I'm afraid that Power BI doesn't exactly support it now. However, one workaround is below:

Don't need any measure. Just refer to this document to set Conditional formatting of Value.

color.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Icey ,

 

Not worked on my table.

If you see Akshay row it not reflecting date wise.

I guess it takes all over the table value and applies based on the table value.

Actually I want Individual Performance of all employee.

 

Format.PNG

 

Thanks,

Arvind

Hi @arvindyadav ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.


Best Regards
Icey

Hi @Icey ,

 

It is still not solved my problem.

 

Conditional Format.PNG

Hi @arvindyadav ,

Please share me your matrix value by Excel or just Ctrl+C and Ctrl+V. If you don't mind, sharing an example PBIX file without sensitive information is great.

 

Best Regards,

Icey

Hi @arvindyadav ,

Try this:

1. Create a measure.

Measure 3 =
RANKX (
    ALLEXCEPT ( 'Table (2)', 'Table (2)'[Keyword] ),
    CALCULATE ( MAX ( 'Table (2)'[Value] ) )
)

2. Set conditional formatting of Value.

cplor2.PNG

Then, you can get this:

cplor.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.