Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
SonPhanHumanIT
Contributor III
Contributor III

Interval Match Multi/Div

Hello Qlik experts,

I have a question regarding IntervalMatch. It is possible to calculate subtotals using IntervalMatch, as shown in the example:

SonPhanHumanIT_0-1688035140555.png

SonPhanHumanIT_1-1688035151686.png

 

Is there a way to specify in IntervalMatch that instead of addition, I want to multiply or divide certain rows? For example: (A*C)/D

IF possible keep the Frontend Simple with a single Sum.

Thank you for your assistance. 

Phan

Labels (2)
3 Replies
marcus_sommer

In general it should be possible to generate an appropriate data-structure within the script to keep the UI expressions as simple as possible and especially by the summing-task it's achievable. By multiplying/dividing it's more difficult but it should be possible, too.

I'm not sure if you really need to an interval-match or maybe an internal while-loop or similar to create the data-structure because there should be already an appropriate logic within the source-system in which the accounts are grouped.

To get all this within the origin dimensionality isn't easy but it's not necessary because you could add all logic within parallel dimensions. Here is a good explanation of how the logic works:

The As-Of Table - Qlik Community - 1466130

udit_k
Partner - Creator II
Partner - Creator II

Use the below expression for A*C/D requirement. 

if(DIM='E', (sum(total {<DIM={"A"}>}Num*Multiplier) * sum(total {<DIM={"C"}>}Num*Multiplier))/sum(total {<DIM={"D"}>}Num*Multiplier), SUM(Num*Multiplier))

SonPhanHumanIT
Contributor III
Contributor III
Author

@udit_k 

Thank you for your response. I'm already familiar with this solution, but the dataset is much larger, and building a nested IF statement for 20-30 lines wouldn't be very readable. Therefore, I would prefer a solution in the script.

Thank you, @marcus_sommer . Maybe the post will help me further, and I'll follow it as soon as possible.