Forum Discussion
DAX logic based on refresh failures or inprogress
- 2 years ago
Hi, jakaihammuda
try belowlatest status = var a = MAXX(all('status'[Load Start Timestamp]),'status'[Load Start Timestamp]) VAR b = MINX(FILTER(ALL('status'),'status'[Entity Name]=MAX('status'[Entity Name]) && 'status'[Load Start Timestamp]=a), 'status'[Status Name] ) var c = MAXX(FILTER(ALL('status'),'status'[Status Name]="succeeded" && 'status'[Entity Name]=MAX('status'[Entity Name])), 'status'[Load Start Timestamp]) var d = IF(b<>"succeeded",c) RETURN d
Anyting ive done, displays no data so im kind of stuck from the get go. Ive tried Variables, creating a measure then referencing it in a CC. but ive just had no luck with everything so far
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- jakaihammuda2 years agoHelper III
Load Start Timestamp Entity Name Status Name 2023-12-18 21:30:06.1127300 CIS In Progress 2023-12-17 21:30:04.8066100 CIS Failed 2023-12-16 22:30:03.1503730 CIS Succeeded - Dangar3322 years agoResident Rockstar
Hi, jakaihammuda
try belowlatest status = var a = MAXX(all('status'[Load Start Timestamp]),'status'[Load Start Timestamp]) VAR b = MINX(FILTER(ALL('status'),'status'[Entity Name]=MAX('status'[Entity Name]) && 'status'[Load Start Timestamp]=a), 'status'[Status Name] ) var c = MAXX(FILTER(ALL('status'),'status'[Status Name]="succeeded" && 'status'[Entity Name]=MAX('status'[Entity Name])), 'status'[Load Start Timestamp]) var d = IF(b<>"succeeded",c) RETURN d- jakaihammuda2 years agoHelper III
Dangar332, Amazing!! You have made my day and taught me a valuable new skill in DAX!
Thank you very very much for taking the time to help me on this 🙂
Wishing you a fantstaic new year!
- jakaihammuda2 years agoHelper III
I hope the above is sufficient enough, it should be as it covers all scenarios. Ive provided an example just for one report name, CIS
With 18th being in progress, itll need to use the last successful load start timestmp until the new status of the 18th is confirmed.
If for example the 18th ended up failing, the same as the 17th, it will then again need to use the last successul laod start timestamp.