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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AA622
Helper II
Helper II

Conditional formatting for most recent date

Hello

 

I have a table that lists the invoice account with multiple invoice dates. I ran a query to help pull the 'Last invoice date'. The table will pull the most recent invoice date for an account. Sometimes it'll have multiple dates for one account but only need to see the most recent one. How can I use either a measure or conditional formatting or BOTH to display the 'last invoice date'.

 

Heres an example of what the list will look like

Lastinvoicedate.png

 

 

 

 

 

 

 

Account 200017 has the last invoice date of 9/15/2021

Account 200018 has 2 of 7/19/2021 so in this case both would be highlighted. I still need to display the other dates but want the 'last invoice date' to stand out.

 

I am thinking of background color or icons for conditional formatting style.

 

Please let me know if you think a measure or how to use conditional formatting for this

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @AA622 ,

 

Table.

vcgaomsft_0-1647928157433.png

Please create a measure.

 

colour = 
var _value =SUM('Table'[Last Invoice Date])
return
SWITCH(
    TRUE(),
   _value =CALCULATE(MAX('Table'[Last Invoice Date]),ALLEXCEPT('Table','Table'[Invoice Account])),"red",
    BLANK()
)

 

Configure conditional formatting.

vcgaomsft_1-1647928242644.png

vcgaomsft_2-1647928272894.png

The result is shown below.

vcgaomsft_3-1647928618083.png

Attach the PBIX file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @AA622 ,

 

Table.

vcgaomsft_0-1647928157433.png

Please create a measure.

 

colour = 
var _value =SUM('Table'[Last Invoice Date])
return
SWITCH(
    TRUE(),
   _value =CALCULATE(MAX('Table'[Last Invoice Date]),ALLEXCEPT('Table','Table'[Invoice Account])),"red",
    BLANK()
)

 

Configure conditional formatting.

vcgaomsft_1-1647928242644.png

vcgaomsft_2-1647928272894.png

The result is shown below.

vcgaomsft_3-1647928618083.png

Attach the PBIX file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

parry2k
Super User
Super User

@AA622 I have recently created a video on how to highlight min and max value in a matrix/table visual, in your case it will be MAX value, check this video here and tweak it as you see fit https://youtu.be/TeeKcHjA8E0

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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