Forum Discussion
Anonymous
7 years agoNot applicable
Power Query Nested IF AND Statement
Hi All, I am working with the fiscal calendar below: January: 01/01/2018 - 01/26/2016 February: 01/27/2018 - 02/23/2018 I would like to create a new column in Power Query that identifies th...
- 7 years ago
Hi Anonymous,
Please refer to the snapshot below and try the formula. Your sample is too short. So I just hardcode these rules.
if [Requested Date] >= #date(2018, 1, 1) and [Requested Date] <= #date(2018, 1, 26)
then #date(2018, 1, 1)
else if [Requested Date] >= #date(2018, 1, 27) and [Requested Date] <= #date(2018, 2, 23)
then #date(2018, 2, 1)
else #date(9999, 12, 31)Best Regards,
Dale
drewlewis15
7 years agoSolution Specialist
Do you have a calendar table in your model that represents your fiscal calendar? As long as that calendar table has a single record for each date, then you could simply merge the calendar table to your customer table and bring in either the fiscal month name (January, February...) or bring in the first date of that fiscal month (you would need that column to exist in your calendar table).
- Anonymous7 years agoNot applicable
This sounds like a simple option. Do you have any links you can refer me to? I know I can easily create the table.
