Forum Discussion
Anonymous
6 years agoNot applicable
date category in query editor
Hello, I would like to create a custom column into query editor which give the date category as follow if date1 is null then 'No Data' if date1 - today() < 0 then 'Date Past' if date1 - today(...
- 6 years ago
Hi Anonymous ,
You need to use
DateTime.Date(DateTime.LocalNow()))
You may want to go to this posting, I included my pbix at the end
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Nathaniel_C
Community Champion
6 years agoHi Anonymous ,
Good job! You might also look into using SWITCH() in these situations with variables to make debug easier.
Nathaniel
Anonymous
6 years agoNot applicable
Thank you! In Query Editor, if you are adding a custom column, does the switch function will works?
If you could provide me a simple example with a custom column in Query editor, I will be glad to test it.
Best Regards,