Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I am trying to add some custom columns using Power Bi 

= Table.AddColumn(#"Filtered Rows", "IsCurrentMonth",  if(Date.Month([Timestamp])=Date.Month(NOW())) then "Current Month" else "Other")

but getting an error message

Expression.Error: The name 'NOW' wasn't recognized. Make sure it's spelled correctly. 

How can I get current month? 

1 Answer

0 votes
by (22.5k points)

Use the following measure:

= Table.AddColumn(#"Filtered Rows", "IsCurrentMonth",  if(Date.Month([Timestamp])=Date.Month(DateTime.LocalNow())) then "Current Month" else "Other")

Want to learn more about Power BI? Check out today: Power BI course      

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...