Forum Discussion
Create calculated table and Return earliest date from Sum Original Table
I need help completing the formular below is possible .
4 Replies
- mahoneypatMicrosoft Employee
Hard to be sure w/o seeing your data and model, but try this measure:
LastDate =
VAR summarytable =
SUMMARIZE (
Table,
Table[Value],
Table[Date],
"FailedCount", CALCULATE (
COUNT ( 'Table'[Value] ),
'Table'[Type] = "cs-accelerator-CS Accelerator Assessment",
'Table'[State] = "Failed"
) + 0
)
VAR filtered =
FILTER ( summarytable, "FailedCount" >= 0 )
RETURN
MINX ( filtered, Table[Date] )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- AnonymousNot applicable
The syntax for 'Table' is incorrect. (DAX(VAR summarytable =SUMMARIZE (Table,Table[Value],Table[Date],"FailedCount", CALCULATE (COUNT ( 'Table'[Value] ),'Table'[Type] = "cs-accelerator-CS Accelerator Assessment",'Table'[State] = "Failed") + 0)VAR filtered =FILTER ( summarytable, "FailedCount" >= 0 )RETURNMINX ( filtered, Table[Date] ) )).
mahoneypat says the syntax is incorrect
- v-chuncz-msftCommunity Support
Anonymous
Just change it as follows.
CONVERT ( MIN ( 'Table'[Date] ), STRING ), "No"- AnonymousNot applicable
v-chuncz-msft this is on step closer to where I would like to be but it is returning min date instead of Earlierst . Please see screenshot attached.
It should return 14/01/2020