Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello - I'm trying to add a column to the below table that is the % of the total in the 2nd column:
Sub Class | Growth $ | % of Total Growth |
GPT | $1,500 | 16% |
CRM | $2,500 | 26% |
Quantitative | $3,800 | 40% |
ID | $950 | 10% |
Custom | $850 | 9% |
The 2nd column (Growth $) is the following set analysis:
Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
Can someone point in the right direction to adding the correct %'s in the 3rd column (% of Total)??
Try this
RangeSum( Sum({$<Year = {'2018'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]), -Sum({$<Year = {'2017'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]) ) / RangeSum( Sum(TOTAL {$<Year = {'2018'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]), -Sum(TOTAL {$<Year = {'2017'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]) )
I am assuming you mean [value in column2]/[total of column2]
you need to use TOTAL qualifier. to put simply
your_expression divided by your_expression with total qualifier added
https://community.qlik.com/t5/Qlik-Design-Blog/What-does-the-TOTAL-qualifier-do/ba-p/1472990
Try this
RangeSum( Sum({$<Year = {'2018'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]), -Sum({$<Year = {'2017'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]) ) / RangeSum( Sum(TOTAL {$<Year = {'2018'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]), -Sum(TOTAL {$<Year = {'2017'}, [Transaction Line Accounts Account Number] = {404100},[Transaction Type] = {'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'}, $(vExcludeDateFields)>} [Transaction Line Gross Amount]) )