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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
gp93
Helper I
Helper I

filter by each distinct value

Think my logic is off here but I always seem to struggle with things like this:

 

formatTest = IF(
                CALCULATE([%Cancelled],MONTH(****[ApplicationDate]) =MONTH(TODAY()),DISTINCT(****[Name])) < 
                CALCULATE([% Cancelled],MONTH(****[ApplicationDate]) = MONTH(TODAY())-1,DISTINCT(****[Name])),
                "#008000",
                "#FFFFFF")

I want a cell in a matrix table to be coloured green if it is lower than the previous month's value, the current formula works in terms of the date, but it colours the entire column green as it is lower at an overall level, i want it to go down to the by each name level.

 

Table looks like:

 

            Last month     This month

Name

Name

Name

Name

 

Apologies if I am not explaining myself very well.

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @gp93,

Based on my test, I am afraid you could not use DAX formula to change the value's color, I suggest you use conditional formatting in tables:https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting

1.PNG

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there

Could you not use the conditional formatting and click on the drop down and use Field Value

Here are details from the blog post, which explain exactly how to do this
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-august-2018-feature-summary/#conditionalFo...




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.