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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lovishsood1
Resolver I
Resolver I

Highlight news rows added based on Date

Hello Everyone,

 

I have a table in which data is being stored DATE-wise.

 

I have taken a MATRIX visual and date slicer.

I want to highlight new rows added based on slicer selection.

For example;

lovishsood1_0-1706892861052.png

I have selected 3rd jan to 26th Jan.

lovishsood1_1-1706892944296.png

I want to highlight the 2020 column as it was added on the 26th Jan and it was not present on the 3rd Jan.

 

lovishsood1_2-1706893027428.png

I'm already highlighting duplicate rows. If two values exist for the same country and the same year then it highlights it.

 

 

Measure for above Conditional Formatting:

 

Tooltip_color_Goal-1 = 
var minDate = CALCULATE(Min('Goal 1'[UpdatedFromDate]),ALLSELECTED('Goal 1'[UpdatedFromDate]))
var maxDate = CALCULATE(MAX('Goal 1'[UpdatedFromDate]),ALLSELECTED('Goal 1'[UpdatedFromDate]))
var minValue = CALCULATE(MAX('Goal 1'[Value]),'Goal 1'[UpdatedFromDate]=minDate)
var maxValue = CALCULATE(MAX('Goal 1'[Value]),'Goal 1'[UpdatedFromDate]=maxDate)
//var CreatedDate = IF((SELECTEDVALUE('Goal 1'[Created])>=minDate && //SELECTEDVALUE('Goal 1'[Created])<=maxDate),1,0) 
RETURN
/* SWITCH(TRUE(),minDate=maxDate,0,minValue=maxValue,0,1) */
//IF(CreatedDate=1,1,
IF(minDate=maxDate,0,
IF(minValue=maxValue,0,1))

 

 

I hope my problem is understood.


I want to highlight new rows added based on the SLICER SELECTION.

9 REPLIES 9
bolfri
Solution Sage
Solution Sage

Hi, can you share some sample data to work with? 🙂





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

Proud to be a Super User!




YearValueUpdatedFromDateCountryAbrv
20094.203-01-2024LU
200930.903-01-2024TR
20092.903-01-2024UK
2010403-01-2024AT
20101.903-01-2024BE
20105.703-01-2024EU
202015.326-01-2024AL
20203.226-01-2024SK
202021.926-01-2024TR
2009226-01-2024LU

 

Above sample contains duplicate as well as new data based on DATE.

Anonymous
Not applicable

Hi @lovishsood1 

 

You can try this measure

Tooltip_color_Goal-1 = 
var minDate = CALCULATE(Min('Goal 1'[UpdatedFromDate]),ALLSELECTED('Goal 1'[UpdatedFromDate]))
var maxDate = CALCULATE(MAX('Goal 1'[UpdatedFromDate]),ALLSELECTED('Goal 1'[UpdatedFromDate]))
var minValue = CALCULATE(MAX('Goal 1'[Value]),'Goal 1'[UpdatedFromDate]=minDate)
var maxValue = CALCULATE(MAX('Goal 1'[Value]),'Goal 1'[UpdatedFromDate]=maxDate)
var updatedDate = SELECTEDVALUE('Goal 1'[UpdatedFromDate])
var maxSlicerDate = CALCULATE(MAX('Goal 1'[UpdatedFromDate]),ALL('Goal 1'))
RETURN
IF(updatedDate<maxSlicerDate,
IF(minDate=maxDate,0,
IF(minValue=maxValue,0,1)),
1)

vjingzhanmsft_1-1707209780579.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Nope, It's not making any impact on it.

 

I think, it is because you have used SELECTEDVALUE function which is not applicable on BETWEEN Slicer.

Anonymous
Not applicable

Hi @lovishsood1 

 

I think your real data are more complex so SELECTEDVALUE returns blank when there are multiple dates for the same region and year, which makes it not work. Try replacing SELECTEDVALUE with MAX. If this still doesn't work, could you provide some more dummy data that can represent your data to work with? 

 

Regards,
Jing

How do I share a CSV file here? 

Not able to upload - Neither XLSX Nor PBIX file.

 

Can you please help me out, How can I share more dummy data?

Anonymous
Not applicable

I can only provide 10 x 10 data. But I want to provide more than this.

You can use wetransfer.com to give Us a csv file or even a pbix file with sample data included.





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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.