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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Show current month and previous month in separate visualizations.

Hi,

 

I have a scenario where I would like to display the value for current month in one data card and the value for previous month in another. I would like to be able to just apply the date in the Filter on all pages to update the entire Power Bi since this is a monthly report. The current month should display 0.55 (December) as it does below and the previous month should display 0.39 (November). I am not real sure how to go about solving this issue since and am willing to try whatever.

 

rossjmullen_0-1612821030613.png

rossjmullen_1-1612821047738.png

 

Thanks in advance for any help!

 

 

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

If your date column is contiguous dates,take below steps:

Create a measure as below:

Previous = CALCULATE(SUM('Table'[value]),DATEADD('Table'[date],-1,MONTH))

And you will see:

v-kelly-msft_0-1612944133217.png

For the related .pbix file,pls see attached.

 

Otherwise,first create a calendar table as below:

calendar = CALENDAR(MIN('Table'[date]),MAX('Table'[date]))

And create a relationship between your table and calendar table;

Then create a measure as below:

_Previous = CALCULATE(SUM('Table'[value]),DATEADD('calendar'[Date],-1,MONTH))

 And you will see:

v-kelly-msft_1-1612944468542.png

 

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

If your date column is contiguous dates,take below steps:

Create a measure as below:

Previous = CALCULATE(SUM('Table'[value]),DATEADD('Table'[date],-1,MONTH))

And you will see:

v-kelly-msft_0-1612944133217.png

For the related .pbix file,pls see attached.

 

Otherwise,first create a calendar table as below:

calendar = CALENDAR(MIN('Table'[date]),MAX('Table'[date]))

And create a relationship between your table and calendar table;

Then create a measure as below:

_Previous = CALCULATE(SUM('Table'[value]),DATEADD('calendar'[Date],-1,MONTH))

 And you will see:

v-kelly-msft_1-1612944468542.png

 

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors