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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
singhcv123
Contributor
Contributor

don't want to show same period last year data in a different column

Hi,

I am using pivot table and calculating current,previou and same period last year data in table.

as given in below screenshot i want the data in financial year 2016 not in 2015 ... because i selected 2016 in list box...

what to do .

Set expression for :

This Period :sum(Count)

Previous Period:Sum({<[New Period Code]={$(=if([New Period Code]=1,13,[New Period Code]-1))}>}Count)

Same Period Last Year :Sum({$<[New Period Code]={$(=Num([New Period Code]))},[Financial Year]={$(=NUM([Financial Year])- 1)}>}Count)

please suggest.

screenshot.png

2 Replies
MK_QSL
MVP
MVP

Provide data to work !

tresesco
MVP
MVP

Two ways are there I can suggest.

  •      In the script, create another column with last year data. Check :The As-Of Table for idea.
  •      In the UI, use pick()/match(), possibly in combination with synthetic dimension Valuelist()/Valueloop()

Both the ways have their pros and cons.