Forum Discussion
Tlotly
5 years agoHelper V
Create a custom column containing a variable
Good day Please assist. How do I create a column in powerquery with the following DAX? DefaultYear = if(YEAR(TODAY()) = 'Branch Scores'[FinYear], "DefaultYear" , 'Branch Scores'[FinYear]) ...
- 5 years ago
Hi Tlotly ,
Create a column as below:
=if [Year]=Date.Year(DateTime.LocalNow()) then "Default Year" else [Year]For my sample .pbix file ,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
v-kelly-msft
5 years agoCommunity Support
Hi Tlotly ,
Create a column as below:
=if [Year]=Date.Year(DateTime.LocalNow()) then "Default Year" else [Year]
For my sample .pbix file ,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!