cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
abisaileon11 Regular Visitor
Regular Visitor

Current Month in date table

Hello everybody, 

I built a date table for my report and now I want to show a column in this to show the current month...

Sin título.jpg

This table goes from 1/1/2000 from 1/1/2050 because will be using this in the future. 

 

I want a column in this table that shows "Mes Actual" in case month is the current month or "Historico" in case month is not the current month. 

 

I tried with a calculated column

 

CM = if('calendar'[Mes]=MONTH(today()),"Mes Actual", "Histórico")

but in this case it shows "mes actual" in february of every year and I need to show this only in februay of 2019. 

 

Sin títulos.jpg

 

Hope you can help me. 

Thank You.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Current Month in date table

Hi @abisaileon11

 

You're almost there.  Just need to include the year in the condition:

 

CM = if('calendar'[Mes]=MONTH(today()) && 'calendar'[Año]=YEAR(today()),
"Mes Actual", "Histórico")

 

View solution in original post

1 REPLY 1
Super User
Super User

Re: Current Month in date table

Hi @abisaileon11

 

You're almost there.  Just need to include the year in the condition:

 

CM = if('calendar'[Mes]=MONTH(today()) && 'calendar'[Año]=YEAR(today()),
"Mes Actual", "Histórico")

 

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 159 members 1,753 guests
Please welcome our newest community members: