Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

previous year's data regardless of current data

Hi Experts,

pls take a look at attached qvw.

Do you know a soloution to show previous year's data regardless of current data even by select a Date range? 

Result schould be like this:

 FirmaDimTOTALTOTALTOTALXXyy
WochentagDimAbweichungPaketeVorjahrPaketeVorjahrPaketeVorjahr
Mo 752%511603261,0018559,00
Di 202%793263327203,0046660,00
Mi -58%23155145204,00186347,00
Do   552 300,00 300,00
Fr   553 400,00 400,00
Gesamt 76%1.5351.4896981108,008371166,00

 

Thanks!

4 Replies
Highlighted

If i understand correctly, Create one field in script

Year(Datun) as Year

And, They try expression like

Pick(Match(Dim,'Pakete','Vorjahr','Abweichung'),
Num(sum(AnzahlPakete), '#.##0'),
Num(sum({1<Year={"$(=Max({<Datun, Range>} Year-1))"},WeeksAgo = {$(vWeeksAgo)}>} AnzahlPakete),'#.##0'),
Num((sum( AnzahlPakete) /
sum({1<WeeksAgo = {$(vWeeksAgo)}, Key = {"=Sum( AnzahlPakete)>0"} >} AnzahlPakete))-1,'#,%'))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Contributor III
Contributor III

Thanks for your reply, but it doesnt work. For more clearness i added second table (Bestand2).

I want to show in Total only the difference in percent. Taht's why i have FirmaDim and Dim as Dimensions.

At the same time i want to show the previous year value in selected Range. Unfortunately, it is only displayed if there is data for this year ...

 
Highlighted
Contributor III
Contributor III

Any Idea, suggestions ...?

 

 

Highlighted
Digital Support
Digital Support

Have a look at the following Design Blog post:

https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511

There are some related links on that one at the bottom to further/related posts as well.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.