Forum Discussion
jakaihammuda
Helper III
2 years agoDAX logic based on refresh failures or inprogress
Hello, I have a basic 3 column table. However the logic i want to implement i cant quite figure out. Essentially all i want to do is the following: If the [statusname] of a report is either F...
- 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
Dangar332
Resident Rockstar
2 years agohi, jakaihammuda
try below measure
Measure 3 =
var a = CALCULATE(max('status'[Load Start Timestamp]),ALLEXCEPT('status','status'[Entity Name]))
var b = CALCULATE(MIN('status'[Status Name]),'status'[Load Start Timestamp]=a,'status'[Entity Name]=MAX('status'[Entity Name]))
var c = MAXX(
FILTER( 'status',[Entity Name]=MAX([Entity Name]) && [Status Name]="succeeded"),
[Load Start Timestamp])
RETURN
IF(b="failed",a,c)
for latest status
latest status =
CALCULATE(MIN('status'[Status Name]),FILTER('status','status'[Load Start Timestamp]=[Measure 3]))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.and don't forgot to give kudos.
jakaihammuda
Helper III
2 years agoThis still takes the load timestamp of the one that failed when it should be last successful..
if the 18th failed (today/latest status) then that should appear as the acualy status
but for the load timestamp (which i use to show how up to date the data is) i want to use whatever the last successful load start timestamp was. whilst still having the status as Failed - because it did fail the load time stamp (data) didnt update