Forum Discussion
Anonymous
5 years agoNot applicable
How to create a new column and use DateDiff function with multiple IF statements?
I am very new to Power BI and trying to create a new column Aging and Logic will be Logic 1: IF the column Proposed Complete Date does not contain Good and ART and 2021 and 2020 then DATEDIFF([T...
- Anonymous5 years ago
Aging =
Table.AddColumn(#"Duplicated Column1", "Aging", each if not Text.Contains([Proposed Complete Date],"Good") and not Text.Contains([Proposed Complete Date],"2021")and not Text.Contains([Proposed Complete Date],"2020") and not Text.Contains([Proposed Complete Date],"ART") then Duration.TotalDays([Today Date]-[Request Date]) else "")
Logic 2:
if [Sliped Date] > #date(2019,12,31) then Duration.TotalDays([Sliped Date]-[Request Date]) else [Aging]
--Nate
Anonymous
5 years agoNot applicable
Do you want this in Power Query (M) or DAX?
Anonymous
5 years agoNot applicable
Preference is Power Query (M).