Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kmmqlick
Contributor III
Contributor III

current 4 weeks and Previous 4 weeks Data calculation

Hi All, Thanks for your support in advance .

I am having data Product,country,date ,sales. I want to calculate Current 4 weeks sales data and Previous 4 weeks sales data. I want expression for this case. I tried some possibilities but those are failed.

Max date in 05/04/2021, I want 08/03/2021 to 05/04/2021 ( Current 4 weeks ) and 07/02/2021 to 07/03/2021 (Previous 4 weeks ) Sales and i also need to calculate Growth Percentage also.

Labels (1)
1 Reply
andykrst
Contributor III
Contributor III

hii,

what i get from your post is, you want to compare those 2 values right?

if you compare it as single value vs single value (KPIvsKPI), you can use set analysis to make this calculation , for example :

sum({<dateField = {">=08/03/2021<=05/04/2021"}>}sales)

you can adjust date value in that expression using variable, for example : 

sum({<dateField = {">=$(vstart4Currw)<=$(vend4Currw)"}>}sales)

 

but, if you want to show that comparison in (let say) Line chart ,  you need to transform some of the data to adjust the dimension to fulfill the requirement of that chart.

 

hope this help