Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I had a question with respect to this point:
In the example given, there are two dimensions, namely year and quarter. The sum for 2012 is 6000, and for 2013 is 4800.
How can I make a table with year | quarter | sum per quarter | % in quarter with respect to year ?
This would then look like:
Year | Quarter | Amount | % in quarter |
2012 | Q1 | 1100 | 18% |
2012 | Q2 | 1700 | 28% |
2012 | Q3 | 1400 | 23% |
2012 | Q4 | 1800 | 30% |
2013 | Q1 | 1000 | 21% |
2013 | Q2 | 1300 | 27% |
2013 | Q3 | 1100 | 23% |
2013 | Q4 | 1400 | 29% |
1:
LOAD Year,
Quarter,
Amount
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/calculating-percentages-per-dimension/td-p/1699310]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);
left join
load
Year, sum(Amount) as Sum Resident 1 Group by Year;
NoConcatenate
Finale:
load *, Amount/Sum as Ratio Resident 1; DROP Table 1;
Hello Frank,
Thanks a lot for your swift suggestion.
Unfortunately, I cannot access the load script (Enterprise version with limited access rights).
Is there a way to achieve the same result in charts/tables directly?
Thanks again!
use this as expression:
sum(Amount)/sum(Total<Year>Amount)
Try this,
sum(Amount)/sum(total <Year>Amount)