Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Calculating Percentage Per Month

Hi all,

Below is the table I want to achieve in QlikSense.  I'm having troubles doing the computation for the "%" column per month.

sample.PNG

The field ReportMonth was defined in the loadscript to be Month with the format 'MMM-YY'

I've already tried the following syntax..

sum(Output) / sum(TOTAL Output)

sum(Output) / sum(TOTAL {<ProductType>} Output)

sum(Output) / sum(TOTAL {<ReportMonth>} Output)

sum(Output) / sum(TOTAL {<ReportMonth,ProductType>} Output)

Thanks!

1 Solution

Accepted Solutions
darkhorse
Valued Contributor

Re: Calculating Percentage Per Month

Hello,

Without the curly brackets.


Try

sum(Output) / sum(TOTAL <ReportMonth> Output)


BR


Serhan

6 Replies
darkhorse
Valued Contributor

Re: Calculating Percentage Per Month

Hello,

Without the curly brackets.


Try

sum(Output) / sum(TOTAL <ReportMonth> Output)


BR


Serhan

Not applicable

Re: Calculating Percentage Per Month

Hi Serhan, already did that but the percentage computed is based on the overall total across three months...

darkhorse
Valued Contributor

Re: Calculating Percentage Per Month

Can you send the app? Is it possible?

BR

Serhan

Not applicable

Re: Calculating Percentage Per Month

Hi Serhan,

I decided to re-build the pivot table I was working with and the syntax you provided previously now works! Thanks! Might be an issue with the loadscript, I made the table prior to defining the MONTH field in the loadscript...

saadzaman
New Contributor III

Re: Calculating Percentage Per Month

Hi Serhan,

I am actually struggling to get the %age for individual months

My Measure looks like:

sum({<ABC-={'181 and Above'},DEF={'APPROVED'}>}[XXX])

/

Sum (TOTAL {<ABC-={'181 and Above'},DEF={'APPROVED'},MonthYear>}[XXX])

I have also tried below :

sum({<ABC-={'181 and Above'},DEF={'APPROVED'}>}[XXX])

/

Sum (TOTAL {<ABC-={'181 and Above'},DEF={'APPROVED'}>}MonthYear[XXX])

But this does not give any result.

Regards,

Saad

saadzaman
New Contributor III

Re: Calculating Percentage Per Month

Sample Data

DescriptionJan-2017Feb-2017Mar-2017
AAA40.88%38.52%28.52%
BBB18.86%15.57%13.57%
CCC9.86%9.86%10.86%
DDD5.24%5.24%8.24%
EEE4.26%4.26%6.26%
FFF4.52%4.88%5.88%
GGG3.38%3.38%5.38%
HHH2.45%2.45%3.45%
III5.68%5.68%3.68%
JJJ2.78%2.78%2.78%
KKK0.57%1.86%1.86%
LLL0.54%1.54%1.54%
MMM0.36%1.36%1.36%
NNN0.23%1.23%1.23%
OOO0.14%1.14%1.14%
PPP0.12%0.12%1.12%
QQQ0.03%0.03%1.03%
RRR0.06%0.06%1.06%
SSS0.02%0.02%1.02%