Forum Discussion
Anonymous
4 years agoNot applicable
Issue with Filtering Data using IF ELSE Condition In Power Query
Hi Mates, I am facing issue while filtering the data based on specific If Else Condition. So generally I have a data that I want to filter based on Current Day Name. If Current Day is 'Monday' th...
- 4 years ago
Try this for your red part instead:
CurrentDate = Date.From(DateTime.LocalNow()), DaysToLoad = if Date.DayOfWeekName(CurrentDate) = "Monday" then 3 else 1, #"Filtered Rows" = Table.SelectRows(#"Changed Type", each Date.IsInPreviousNDays([Created On], DaysToLoad)),
AlexisOlson
4 years agoSuper User
Try this for your red part instead:
CurrentDate = Date.From(DateTime.LocalNow()),
DaysToLoad = if Date.DayOfWeekName(CurrentDate) = "Monday" then 3 else 1,
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each Date.IsInPreviousNDays([Created On], DaysToLoad)),- Anonymous4 years agoNot applicable
Thank you AlexisOlson , It works perfectly as I am expecting..!!