Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display Total Values in Pivot irrelevant of Dimension

Hi All,

I have a following Query ...

I have a dimension named Occupancy . Occupancy consists of following values Subject1 , Subject2 , Subject3 ,Subject4 .

The total count of students for Subject1 + Subject2 +Subject3 + Subject4 =100.

But in the dimension I have to consider only subject1 and Subject2 as shown in the below table

In the Pivot Table I have to display the results as below

YearOccupancyCount of StudentsTotal Students%
2010Subject 13010030%
Subject 24010040%


The problem here is as I am taking only the Subject1 & Subject2 in the Dimensions . The data is also reduced to that level and I am unable to get the Total Students as 100.

How to display the total Students as 100 . Kindly help me to resolve the Total Students Column .

Thanks in Advance......

10 Replies
Not applicable
Author

hi

U can do through set analysis

Regards,

Suman

Not applicable
Author

Hi,

You can use aggr function in order to represent your expression against some other dimension.

aggr(exp,dimension)

Regards,

Vikas Kumar

Not applicable
Author

Hi ,

Can u please suggest how to do it using Set Analysis ...

Regards,

Chakravarthy

Not applicable
Author

Hi Vikas,

I have tried aggregate function but unable to achieve it .

Can u share an example ...

Regards,

Chakravarthy.

Not applicable
Author

Hi,

As u have written u want total irrespective of Dimensions i think you can use function Total.

Like: Sum(total Sales)

Regards,

Ravi

Not applicable
Author

Hi Ravi,

Thanks for your reply.

If I use the Total It gives the Total as a whole irrelevant to the Year ... and also I have few more dimensions in my table .

Regards,

Suman.

johnw
Champion III
Champion III

Perhaps this?

if(column(1),count({<Occupancy=>} total <Year> distinct Student))

See attached. If that's not what you want, it would make it easier to solve your problem if you posted an example of it or modified mine to suit.

Not applicable
Author

Hi John ,

Thanks for your reply. But it did not solved my problem . I want to explain it in detail . The following table represent my data .

YearGroupRelativeOccupancyNo. of Participants
2009FinanceRelatedSubject11
2009FinanceRelatedSubject232
2009FinanceRelatedSubject363
2009FinanceRelatedSubject424
2009FinanceTotal120
2009HRRelatedSubject1-
2009HRRelatedSubject231
2009HRRelatedSubject343
2009HRRelatedSubject414
2009HRTotal88
2009SalesRelatedSubject11
2009SalesRelatedSubject226
2009SalesRelatedSubject343
2009SalesRelatedSubject48
2009SalesTotal78


I want the output as the following table . I have used the IF Condition at the back end to get only Subject2 & Subject3 in Occupancy Column.

YearGroupRelativeOccupancyNo. of ParticipantsTotal Participants%
2009FinanceRelatedSubject23212026.7
2009FinanceRelatedSubject36312052.5
2009HRRelatedSubject2318835.2
2009HRRelatedSubject3438848.9
2009SalesRelatedSubject2267833.3
2009SalesRelatedSubject3437855.1


Total Participants column is my requirement .I have get the sum of all the subjects with respective of dimnesions .

Please help me on the same .

Thanks in Advance.....

Regards,

Chakravarthy.

Not applicable
Author

Hi ,

Find the attached QVW..