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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ÒScar
Frequent Visitor

PREVIOUSMONTH doesn´t work...

Hi everyone.

 

I have a tiny but mess problem with

 

I have a tiny but mess problem with this simple measure: I got two tables, one with monthly costs of a budget

Scar_0-1632914614257.png

 

and a table data.

 

Scar_1-1632914646980.png

 


I only want to make an easy measure in order to obtain the costs of the previous month:

PREVIOUS MONTH 2021 = CALCULATE((CALCULATE(SUM('Matriz'[Total]), Matriz[Year]="2021", Matriz[Origen]="Cuenta de resultados")), PREVIOUSMONTH(Calendario[Date]))

 

 

It actually is not working so far.

 

Can you help me with it?

 

 

 

Thanks in advance.

 

 

Best

2 REPLIES 2
amitchandak
Super User
Super User

@ÒScar , You should not add filters for year and month. In case you need a filter use a slicer from date table 

 

Assuming year filter related to date of date table

 

PREVIOUS MONTH 2021 = CALCULATE(SUM('Matriz'[Total]), filter(Matriz, Matriz[Origen]="Cuenta de resultados"), PREVIOUSMONTH(Calendario[Date]))

 

refer

Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak ,

 

first of all, thank you so much for your quick response.

 

I share with you a screenshot of my dashboard once I have followed your advice, I´m afraid it still doesn´t work...

Could you take a look on it, please?

 

Thank you once again, @amitchandak ,

 

Scar_0-1632921488592.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.