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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
shahbaznawaz37
Regular Visitor

Highlight Value if Value is Less then previous date in matrix

I am new to Power BI I want to highlight the value in matrix visual if its less then pervious date value. for example, Van_no 0016 & 1005 have less mileage on 08-Apr-20 as compare to 07-Apr-20 and the same condition is for 06-Apr-20 vs 07-Apr-20 also.

 

Mileage.JPG

thanks in advance.

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @shahbaznawaz37 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

 

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

Dear All,

 

Not found any solution from the community I tried a lot but failed.

 

Total Mi flag =
VAR vMeasure = [Total Mi]
VAR vDate = MAX(daily_delivery_report[ddr_date])
VAR vPrevious = CALCULATE([Total Mi],FILTER(daily_delivery_report,(vDate - 1)))
RETURN
IF(vMeasure < vPrevious,1,0)
 
Above formula is showing everywhere 0 
 Capture2.JPG
Greg_Deckler
Community Champion
Community Champion

You probably want to create a flag measure like:

 

Flag Measure = 

  VAR __Measure = [Current Measure]

  VAR __Date = MAX('Table'[Date])

  VAR __Previous = CALCULATE([Current Measure],FILTER('Table',(__Date - 1)))

RETURN

  IF(__Measure < __Previous,1,0)



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

can you please correct below because I am unable to put the column name without function.

 

Flag Measure =

VAR __Measure = MAX(daily_delivery_report[mileage_in])

VAR __Date = MAX(daily_delivery_report[ddr_date])

VAR __Previous = CALCULATE(MAX(daily_delivery_report[mileage_in]),FILTER(daily_delivery_report,(__Date - 1)))

RETURN

IF(__Measure < __Previous,1,0)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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