Forum Discussion
Anonymous
7 years agoNot applicable
IF statement with date
Hi All, Sorry for the basic question, i am new to PowerBI and slowly learning it! I have a table which has the following columns - Name (File Name), Extension (File type e.g .txt), size (siz...
edhans
7 years agoCommunity Champion
Do this in Power Query as a custom column. Look at the Date functions. The Date.IsInPreviousNYears() function in particular would seem to do exactly what you want.
- Anonymous7 years agoNot applicable
Hi Edhans. Thanks for your quick response. I've just tried to add the query but it's not quite stacking up. Please see below.
Surely the files that were accessed the day before yesterday as per the query below, should be hot. As you can see in the screenshot there's a number of files that were accessed on 25th March. Maybe i'm not understanding it properly.
- edhans7 years agoCommunity Champion
Try this:
- Anonymous7 years agoNot applicableHi edhans unfortunately that didn't work.
It just says cold all the way down the list and for some reason I get loads of duplicate rows.
Thank you for your responses.