Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
arsa6978
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
Anil_Babu_Samineni

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,'#,%'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
arsa6978
Contributor III
Contributor III
Author

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 ...

 
arsa6978
Contributor III
Contributor III
Author

Any Idea, suggestions ...?

 

 

Brett_Bleess
Former Employee
Former Employee

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.