Forum Discussion
DAX 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 Failed or InProgress for the latest loadstarttimestamp, then i want to take the most recent loadstarttimestamp where the [statusname] was Successful, else just keep the normal latest loadstarttimestamp if the report was successful on the latest load.
I have renamed the columns but here are their true namings:
Report = 'Table 1'[EntityName]
Refreshed = 'Table 1'[StatusName]
Data up To = 'Table 1'[LoadStartTimestamp] - this takes the "latest" so will change whenevr another report refresh occurs,
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
19 Replies
- lbendlinSuper User
Sounds straightforward. What have you tried and where are you stuck?
- jakaihammudaHelper III
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
- lbendlinSuper User
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