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: 
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 (2)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be

SUM(VOLUME) / SUM(TOTAL <Product_Field_Name> VOLUME)
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

May be

SUM(VOLUME) / SUM(TOTAL <Product_Field_Name> VOLUME)
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful