6 Replies Latest reply: Nov 22, 2017 6:35 AM by saad zaman

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.

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!

• Re: Calculating Percentage Per Month

Hello,

Without the curly brackets.

Try

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

BR

Serhan

• Re: Calculating Percentage Per Month

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

• Re: Calculating Percentage Per Month

Can you send the app? Is it possible?

BR

Serhan

• 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...

• 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,