The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I am keeping a track of days that have an Accidents or Incidents in order to make a dashboard that shows the consucative days from last Accident till the day of today.
I am using Sharepoint list to keep a track of the data.
I am stuck in how to show the consecutive days from the last Accident till the day of today. any idea?
Solved! Go to Solution.
Hi @ELSH1978 ,
Based on your description, I created these data.
Create measure.
Days Since Last Accident =
VAR LastAccidentDate = MAXX(FILTER('Table', 'Table'[TYPE] = "ACCIDENT"), 'Table'[Date])
RETURN
DATEDIFF(LastAccidentDate, TODAY(), DAY)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ELSH1978 ,
Based on your description, I created these data.
Create measure.
Days Since Last Accident =
VAR LastAccidentDate = MAXX(FILTER('Table', 'Table'[TYPE] = "ACCIDENT"), 'Table'[Date])
RETURN
DATEDIFF(LastAccidentDate, TODAY(), DAY)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.
Days without accident = TODAY() - MAXX(Filter('Table',[Type]="Accident"),[Date])
Thanks @lbendlin for your reply.
It didn't work this way, it is not showing the count of days since the latest accident till today, the values I got are the following:
thanks
Format it as a number or use INT()
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |