Forum Discussion
Implementing Time Criteria in DAX formula (AddColumn)
Hi everyone!
I have to refine a formula which has already been established (by someone else), by adding time dimension in it.
So, I have to determine new parameters for outcome "Suspect":
- for values in Column "Date" which are before Jan 1st 2023 parameter for Value should be 100 and parameter for TimeDifference should be same (10) and
- for values in Column "Date" which are on or after Jan 1st 2023 parameter for Value should be 50 and parameter for TimeDifference should be same (10)
The formula which has to be refined is this one:
= Table.AddColumn(#"Add Alert X", "Alert Y", each if [TimeDifference]=null then "Not reported" else ( if [TimeDifference]<10 and [Value]<100 then "Suspect" else "OK"))
Also, part of formula stating #"Add Alert X" - does it mean that the new column which we are creating (Alert Y) comes AFTER the column Alert X?
Thank you in advance!
1 Reply
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.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.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523