Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Klaus
Contributor II
Contributor II

Show All values sorted and grouped in dimension In Pivot Table

Hi

My pivot table has five dimensions and one expressions.

And here is how it looks.

Klaus_0-1614602033047.png

How can I display in the existing selection to see this?
I don't know how to exploit the dimension 'Nr.bon' to reach the excel result.

Klaus_3-1614602706077.png

 

1 Solution

Accepted Solutions
edwin
Master II
Master II

one of the differences between a straight table and pivot is that in a straight table you have the ability to hide columns.  so you can still use the Nr.bon as a dimension and just hide it.  you will see the individual expression values as if Nr.bon were still shown.  obviously, your year and week will be in separate rows not columns.

if however, the year and week columns (in pivot) were finite, you can simulate these two (for example) columns as separate expressions where using variables (as one solution) your first expression would have something like 
{<[Calendar Year]={$(vPriorYear)}, [CalendarWeekOfYear]={$(vWeek)}>}
2nd expression:
{<[Calendar Year]={$(vCurrentYear)}, [CalendarWeekOfYear]={$(vWeek)}>}

this mimics the pivot table having two columns
=$(vPriorYear) &'
' & $(vWeek)
to look like
2020
    2

maybe that helps

View solution in original post

5 Replies
edwin
Master II
Master II

is the requirement not to show that field yet preserve the distribution of the expression even when multiple dimension rows are the same?  since this is an aggregation, any duplicate combination of dimensions will be collapsed into one row.

Klaus
Contributor II
Contributor II
Author

I accept any suggestion that approaches the excel model, I don't necessarily want to keep all the dimensions

edwin
Master II
Master II

one of the differences between a straight table and pivot is that in a straight table you have the ability to hide columns.  so you can still use the Nr.bon as a dimension and just hide it.  you will see the individual expression values as if Nr.bon were still shown.  obviously, your year and week will be in separate rows not columns.

if however, the year and week columns (in pivot) were finite, you can simulate these two (for example) columns as separate expressions where using variables (as one solution) your first expression would have something like 
{<[Calendar Year]={$(vPriorYear)}, [CalendarWeekOfYear]={$(vWeek)}>}
2nd expression:
{<[Calendar Year]={$(vCurrentYear)}, [CalendarWeekOfYear]={$(vWeek)}>}

this mimics the pivot table having two columns
=$(vPriorYear) &'
' & $(vWeek)
to look like
2020
    2

maybe that helps

Klaus
Contributor II
Contributor II
Author

The method given by you is the most suitable. Thank you for your help!

edwin
Master II
Master II

yw