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

Set Analysis on year and month

Hi,

I have a requirement where in the sheet user select

Year and month on the basis of selection the straight table perform and give sum of sales

Eg:-

Current Year Selection = 2012 and Current Month Selection = Dec

In Straight table

Dimension -> Dealer

expression1 -> Sum of sales of previous year 2011 and month Dec

expression2 -> Sum of sales of current year 2012 and month Oct

expression3 -> Sum of sales of current year 2012 and month Nov

expression4 -> Sum of sales of current year 2012 and month Dec

But problem comes when user select month "Jan"  then expression will be for

expression1 -> Sum of sales of previous year 2011 and month Dec

expression2 -> Sum of sales of current year 2011 and month Nov

expression3 -> Sum of sales of current year 2011 and month Dec

expression4 -> Sum of sales of current year 2012 and month Jan

Please help for this

Thanks

2 Replies
Not applicable
Author

Hi,

Any one help me for this.

Thanks

Ritul

Not applicable
Author

Could you show which expressions are you using?

To calculate the month before you should use Addmonths() function if using a date type, or get a correlative number for months if using a number type.

Sent from mobile