Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
omyahamburg
Creator II
Creator II

prior period comparison

Hello all

Can someone help ? My head is blocked by end of this week.

I have a table where I show a sum for a dimension Periode:

PeriodeSum (Restmenge)
2013-Jan6.125.024,43
2013-Feb5.932.647,27
2013-Mrz5.716.283,74

Periode is coming out of my script:

 

year (Date)&'-'&month(Date) as  Periode

How to I write the expression to sum Restmenge for 2012-Jan and so on ?

Thanks for your help.

Joerg

Labels (1)
2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Instead of

     year (Date)&'-'&month(Date) as  Periode

     Create a filed Periode as Monthname(Date) as Periode.

     This will result into Mar 2013 and so on.

     Now You can use below expression to get the last month data.

     =sum({<Periode= {"$(=Monthname(addmonths(max(Date),-1)))"},Year=>}Sales)

Regards,

Kaushik Solanki    

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
omyahamburg
Creator II
Creator II
Author

Dear Kaushik

Thank you, I'll try latest on Monday and will let you know.

best regards

Joerg