Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator II
Creator II

Columns in Pivot Table

Hi,

I have a Pivot Table. I need to show an hide few specific columns in the Pivot Table. How do I achieve this?

Here, under 2017, I need to show Sum(Value) and Sum(Sample) columns while under 2018, I need to show only Sum(Value) but not Sum(Sample). The entire column should be hidden, no nulls or '-'

Please refer to the sample data QVW file for better understanding. Really appreciate your help guys.

1 Solution

Accepted Solutions
sunny_talwar

Something like this?

Capture.PNG

Script changes

Input:

LOAD * INLINE [

    Year, Value, Sample

    2018, 2, 6

    2018, 4, 4

    2018, 6, 9

    2017, 3, 3

    2018, 4, 2

    2017, 1, 5

    2017, 3, 4

    2018, 2, 1

    2017, 8, 0

];


Dim:

LOAD * INLINE [

    Dim

    1

    2

];

Dimensions

Year

=Pick(Dim, 'Value', 'Sample')

Expression

Pick(Dim, Sum(Value), If(Year = 2017, Sum(Sample)))

View solution in original post

6 Replies
Anil_Babu_Samineni

You added wrong file? Can you re attach for us

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
qlikwiz123
Creator II
Creator II
Author

My bad. Corrected

qlikwiz123
Creator II
Creator II
Author

Any help is really great in this issue

qlikwiz123
Creator II
Creator II
Author

stalwar1‌ Any insight?

sunny_talwar

Something like this?

Capture.PNG

Script changes

Input:

LOAD * INLINE [

    Year, Value, Sample

    2018, 2, 6

    2018, 4, 4

    2018, 6, 9

    2017, 3, 3

    2018, 4, 2

    2017, 1, 5

    2017, 3, 4

    2018, 2, 1

    2017, 8, 0

];


Dim:

LOAD * INLINE [

    Dim

    1

    2

];

Dimensions

Year

=Pick(Dim, 'Value', 'Sample')

Expression

Pick(Dim, Sum(Value), If(Year = 2017, Sum(Sample)))

View solution in original post

qlikwiz123
Creator II
Creator II
Author

stalwar1‌     Thank you. You are a Genius