Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Suchitra-15
Contributor
Contributor

How to calculate measures for the Previous month

Hi,

I have measure name column in my dataset. 

That column contains different measure names such as Revenue, PBIT, Gross profit, net profit, COGS, Total cost, account payable, account receivable etc. Then I want to find out values for this measures for the previous month.

Than please provide me how to do that?

Labels (1)
3 Replies
Aditya_Chitale
Specialist
Specialist

Try using this set analysis expression:

sum({<Month={"=$(Date(Addmonths(max(Date),-1),'MMM-YY'))"}>}MeasureName)

Try playing with date & month as per your data.

 

Regards,

Aditya

Suchitra-15
Contributor
Contributor
Author

Thank you Aditya,

Expression is correct but does not shows values

This is expression: sum({<Date={"=$(Date(Addmonths(max(Date),-1)))"}>}[Measure Name]='Revenue')

Please check it and get back to me

 

Regards,

Suchitra

Aditya_Chitale
Specialist
Specialist

Did you try changing date format ? I cannot help you much unless I see your data. If possible jumble values and share sample data.

Regards,

Aditya