Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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;
I have selected 3rd jan to 26th Jan.
I want to highlight the 2020 column as it was added on the 26th Jan and it was not present on the 3rd Jan.
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.
Hi, can you share some sample data to work with? 🙂
Proud to be a Super User!
Year | Value | UpdatedFromDate | CountryAbrv |
2009 | 4.2 | 03-01-2024 | LU |
2009 | 30.9 | 03-01-2024 | TR |
2009 | 2.9 | 03-01-2024 | UK |
2010 | 4 | 03-01-2024 | AT |
2010 | 1.9 | 03-01-2024 | BE |
2010 | 5.7 | 03-01-2024 | EU |
2020 | 15.3 | 26-01-2024 | AL |
2020 | 3.2 | 26-01-2024 | SK |
2020 | 21.9 | 26-01-2024 | TR |
2009 | 2 | 26-01-2024 | LU |
Above sample contains duplicate as well as new data based on DATE.
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)
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.
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?
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.
Proud to be a Super User!
User | Count |
---|---|
79 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
98 | |
89 | |
82 | |
61 |