cancel
Showing results for
Did you mean:
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

and a table data.

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?

Best

2 REPLIES 2
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

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!
Frequent Visitor

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 ,

Announcements

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!