Forum Discussion
Power Query 5 days ago rule
- Jul 06, 2020
Conditional column is only subset of custom columns with user interface to generate if ... then ... else
Anyway, you already have some statement with fixed date. Stay on step where this formula was generated (or use Advanced editor) and change concrete date which is in form #date(2020,7,2) or so, on
Date.From(Date.AddDays(DateTime.LocalNow(),-5))
It works but I explained it incorrectly and is not what I was expecting.
I already have a conditional column with rules, if else if else, I can choose a column with dates and add after a specific date, but I can only input a fixed date, for example june 2 which is 5 days ago, however that query will change often and I need it to apply this rule for the last 5 days no matter when do I update it.
Maybe the only way to make this work is with a custom column rather than a conditional column, but the conditional column is just easier to work with.
Conditional column is only subset of custom columns with user interface to generate if ... then ... else
Anyway, you already have some statement with fixed date. Stay on step where this formula was generated (or use Advanced editor) and change concrete date which is in form #date(2020,7,2) or so, on
Date.From(Date.AddDays(DateTime.LocalNow(),-5))
- Ocasio27Jul 08, 2020Iron Contributor
I am trying to add this as a DAX step
Note that all rules with "Approved" have priority.
= SWITCH (TRUE (),'Test'[Number] = "X001", "Approved",'Test'[Number] = "X002", "Approved",'Test'[Number] = "X003", "Approved",'Test'[Number] = "X004", "Approved",'Test'[Number] = "X005", "Approved",'Test'[Number] = "X006", "Approved",'Test'[Number] = "X007", "Approved",'Test'[Number] = "X008", "Approved",'Test'[Number] = "X009", "Approved",'Test'[Number] = "X010", "Approved","Denied")- SergeiBaklanJul 08, 2020Diamond Contributor
I'm not sure what do you mean under "DAX step"
- Ocasio27Jul 08, 2020Iron Contributor