Forum Discussion
Anonymous
3 years agoNot applicable
Calculated Column based on Dates
I'm trying to find out the Aging of a case wcich registered in our system. In my dataset I have 2 date feilds. Assigned Date, and Completed Date. I have created a calculated column by subtracting...
- 3 years ago
Anonymous OK, so:
= if 'SQL-DATE-UPDATED'[CompletedDate] = null then DateTime.LocalNow() - 'SQL-DATA-UPDATED'[AssignedToDate] else 'SQL-DATE-UPDATED'[CompletedDate] - 'SQL-DATA-UPDATED'[AssignedToDate]
Anonymous
3 years agoNot applicable
Greg_Deckler Thank You. Appreciaet it.
My current calculation is this.
Aging = 'SQL-DATA-UPDATED'[CompletedDate]-'SQL-DATA-UPDATED'[AssignedToDate]
Greg_Deckler
Community Champion
3 years agoAnonymous OK, so:
= if 'SQL-DATE-UPDATED'[CompletedDate] = null then DateTime.LocalNow() - 'SQL-DATA-UPDATED'[AssignedToDate] else 'SQL-DATE-UPDATED'[CompletedDate] - 'SQL-DATA-UPDATED'[AssignedToDate]- Anonymous3 years agoNot applicable
It gives Syntax Error.
I put my actual query name.
- Greg_Deckler3 years ago
Community Champion
Anonymous Dude, you posted in the Power Query forum but it looks like you are trying to put Power Query code into a DAX calculated column. In DAX, that would be:
IF('SQL-DATE-UPDATED'[CompletedDate] = BLANK(), DATEDIFF(TODAY(),'SQL-DATA-UPDATED'[AssignedToDate],DAY), DATEDIFF('SQL-DATE-UPDATED'[CompletedDate], 'SQL-DATA-UPDATED'[AssignedToDate]))- Anonymous3 years agoNot applicable
Sorry Greg_Deckler
I'm beginner. 🙂 Trying to get solve these.
in DAX also i got error.
And in Power Query I got this.