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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
spividori
Specialist
Specialist

Calculation in Pivot table

Hi.

I have to divide each period by the selected, in my example, I have to divide the value of Sep-14 for the value of 14-Feb value, and so with other periods.

The slider object is used for the user to select the number of months you want to analyze from the selected month.

Attached example.

Regards.

Sandro.

1 Solution

Accepted Solutions
sunny_talwar

Try this expression:

1/(sum({<Month={"<=$(=max(Month)) >$(=date(addmonths(max(Month),-$(nMeses)),'MMM YY'))"}>} Indec)/sum(TOTAL{<Month={"=max(Month)"}>} Indec))

Output:

Capture.PNG

Attaching your sample back for reference

Best,

Sunny

View solution in original post

3 Replies
sunny_talwar

Try this expression:

1/(sum({<Month={"<=$(=max(Month)) >$(=date(addmonths(max(Month),-$(nMeses)),'MMM YY'))"}>} Indec)/sum(TOTAL{<Month={"=max(Month)"}>} Indec))

Output:

Capture.PNG

Attaching your sample back for reference

Best,

Sunny

spividori
Specialist
Specialist
Author

Hi Sunny.

It is working properly. Thank you.

Regards.

Sandro.

sunny_talwar

No problem