Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

Percentage split in pivot

Hi sir,

I am trying to calculate percentage in pivot but after adding month as column that percentage divide into two months.if i selected only one month then it is cming correct.can u plz help me to resolve this issue.

Below is the snapshot and expression for the same.

This is one month:

one month.png

Two Month

two month.png

Expression:

Sum(Aggr(sum(DISTINCT{<Flag={'SJ'},fMonth=,[SEGMENT_CODE]={'1','6'}>}TEU),ECARRIER_NAME,Fcldata))

/Sum(total Aggr(sum(DISTINCT  {<Flag={'SJ'},fMonth=,[SEGMENT_CODE]={'1','6'},ECARRIER_NAME={'*'}>}  TEU), Fcldata))

2 Replies

Hi Pranali, TOTAL is used to ignore dimensions (month dimension is also ignored), if you want to keep some dimensions you can add the fields between <>:

Sum(Aggr(sum(DISTINCT{<Flag={'SJ'},fMonth=,[SEGMENT_CODE]={'1','6'}>}TEU),ECARRIER_NAME,Fcldata))

/Sum(total <Month> Aggr(sum(DISTINCT  {<Flag={'SJ'},fMonth=,[SEGMENT_CODE]={'1','6'},ECARRIER_NAME={'*'}>}  TEU), Fcldata))

Partner
Partner

Grate,It's working fine.

Thank you so much sir.