Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
carlbh
Helper I
Helper I

Create a column to show "Previous Month" and "Current Month"

I'm looking for a Dax formula to create a column that will flag wether the date in a row is the "Report Month", "Previous report month", or leave it blank.

The data in question is Case management tickets with a start and resolved date in the system that runs across multiple years.

The complexity being the "Report month" will always be the month preceding the current "today" month.

The reason being to use these as "flags" when creating other measures or when creating visuals.

 A relative novice in PowerBI, with limited knowledge of the DAX commands and syntax,  and I am sure there must be a simple way fo doing this.

Any help/advice gratefully recieved.

2 REPLIES 2
Anonymous
Not applicable

Hey would you able to resolve this? I´m having the same requirement but I have years involved in it.. from 2004 all the way to 2020 yrs... I´m looking to add the current month, 1 past month, 2 past months, 12 and greater past months and on.

 

Any ideas?

 

v-danhe-msft
Employee
Employee

Hi @carlbh,

From your description, it seemed you could use  IF function or SWITCH function to create a calculated column, could you please share some sample data and post your desired result if possible?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.