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: 
Not applicable

HELP!!!

Pls find attached. In my example,  '-ABC', 'DEF' and 'Others' form 100%. I want to calculate the share of each respective item in Apr 13 and Apr 12 after selecting Apr13. However, I was not able to get the them to add up to 100% for Apr 12. Apr 13 works fine though.

Is there anything wrong with my formula for Apr12?

Sum( {$<Month_Id={"<= $(=Max(Month_Id))"},Month=, Month_Year = >} unit

                    /

                    Aggr(NODISTINCT Sum( {<Month_Id={"= $(=Max(Month_Id)-12)"}, Year=, Month=, Month_Year = >} unit),Year))

For Apr 13, I used the following formula and it works fine:

Sum( {$<Month_Id={"<= $(=Max(Month_Id))"},Month=, Month_Year = >} unit

  /

  Aggr(NODISTINCT Sum( {<Month_Id={"= $(=Max(Month_Id))"}, Year=, Month=, Month_Year = >} unit),Year))

5 Replies
n1ef5ng1
Creator
Creator

where are you

Anonymous
Not applicable
Author

What data is present in your Month_id?

Not applicable
Author

Its the unique id for the month

Not applicable
Author

In the first part of your expression for Apr 12, shouldnt it be

Sum( {$<Month_Id={"<= $(=Max(Month_Id)-12)"},Month=, Month_Year = >} unit

Anonymous
Not applicable
Author

Hello,

try you

Sum(unit) / Sum(Total <Period> unit)