Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
peachman
Contributor III
Contributor III

Calculation % Share based upon Column Names.

Hi,

I have the following Pivot table structure (Simplified for Context) 

  • Column 1 is 'YYYYQQ' where QQ is a quarter Number. Eg: 201701 is 2017 Quarter 1.
  • Column 2 is my current % Share Values, but this % sahre split for everything within the table where i need it split by year.
  • Column 3 is my desired output.

My Expression for Column 2 is as follows:

SUM(VOLUME) / SUM(TOTAL VOLUME)

I have tried several different expressions for column 3. one being: 

SUM({<[CSS_YEAR] = {'LEFT([CSS_QTR],4)'}>}VOLUME)

where year is YYYY and QTR is as mentioned about YYYYQQ. I have been trying to get it to aggregate on the date by taking the left of the QTR to just get the date elements. this expression gives me a results of 0.

201701% Share (What I have now)% Share (What I need)
     Product 125%50%
     Product 225%50%
201702  
   Product 125%50%
   Product 225%50%
Labels (3)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be

SUM(VOLUME) / SUM(TOTAL <Product_Field_Name> VOLUME)
Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

1 Reply
Anil_Babu_Samineni

May be

SUM(VOLUME) / SUM(TOTAL <Product_Field_Name> VOLUME)
Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post