Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I'm trying to create a kind of safety cross, informing the days of the current month, and the color green if there was no accident in that day, red if there was an accident and white for future days. Something like that:
My accident table has this structure:
Date | Hour | Description |
01/13/2020 | 17:30:00 | example |
03/08/2020 | 13:30:00 | example |
06/29/2020 | 03:40:00 | example |
The table only shows the days that had accidents. Any other day that is not in the table, it means that there was no accident.
I tried to create correlated tables, creating a CALENDAR table and linking it with the data column of the accident table, but I couldn't move forward.
Can someone help me?
Solved! Go to Solution.
Hi,
I have created date table and established a relationship and used date from the date table in the visual. I have used the below measure in conditional formatting to apply color where there are some accidents.
conditional_check =
CALCULATE (
COUNTROWS ( Accidents ),
FILTER ( Accidents, SELECTEDVALUE ( Calander[Date] ) = Accidents[Date] ))
Add conditional formatting logic where the measure value is higher than 0.
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Hi @Anonymous ,
Create a relationship between tables.
Then create a measure as below.
Measure = IF(SELECTEDVALUE('CALENDAR'[Date])>TODAY(),0,IF(SELECTEDVALUE('CALENDAR'[Date])=SELECTEDVALUE('Table'[Date]),1,2))
At last create conditional formatting.
Result would be shown as below.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I have created date table and established a relationship and used date from the date table in the visual. I have used the below measure in conditional formatting to apply color where there are some accidents.
conditional_check =
CALCULATE (
COUNTROWS ( Accidents ),
FILTER ( Accidents, SELECTEDVALUE ( Calander[Date] ) = Accidents[Date] ))
Add conditional formatting logic where the measure value is higher than 0.
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Hi! there is some kind of a step-by-step way to do it please? i tried to do as you said but couldn't move foward..
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |