Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
devarasu07
Master II
Master II

weird behavior with pivot table or set with agg expression?

Hi

Please refer to the sample attachment, I've pivot table report with calculated dimension and expression used. facing below issue. is this expression issue or pivot table bug? kindly advise me. Thanks

Issue:

I have list box which contains two values (SLG and Shades). if i select Shades the pivot table dimensional column missing. seems agg with set analysis is makking issue or something else?

1.jpg

Note: No issue when i select other filter value (SLG), only pivot table column dispapper when we selected as "Shades"

Thanks, Deva

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add an inner aggr() to your original expression:

aggr(if(aggr(Count({<Year={'*'},Week={'*'},Type_ID={'RO'}>} distinct OrderQty),ArticleNo)>0, 'Repeat', '0'),ArticleNo)

And this only makes sense to me if you move this dimension after ArticleNo in the chart.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

7 Replies
sunny_talwar

I am seeing this issue and someone else also pointed it out here:

Dimension(Column) missing in Pivot when there is Null

devarasu07
Master II
Master II
Author

Hi Sunny,

Thanks for your help, but my case Primary key field missing (it's not null value). but other calculated dimension has null will this cause the problem? thanks

Regards, Dev

sunny_talwar

I think calculated dimensions are what is causing issue here.... Not sure I understand the cause....

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think your problem lies in the 3rd Calculated Dimension labeled "Theme". The if() returns null because SKUTheme contains no values for Shades. Yo can fix it by wrapping the if() in an aggr() to preserve the dimensionality.

=aggr(

..long nested if

,Launch_No,SKUTheme)

The dimension labeled "Repeat" is also problematic when selecting SLG.  Not sure what the fix is for that one.

-Rob

devarasu07
Master II
Master II
Author

Hi Rob,

Thanks for your valuable input, tried with your suggestion but still it's not working. is there any alternate method to write below expression? kindly advise. once again thank you

=aggr(if((Count({<Year={'*'},Week={'*'},Type_ID={'RO'},Delivery_status={'Ongoing'}>} distinct OrderQty))>0, 'Repeat', '0'),Launch_No,SKUTheme, ArticleNo)

Best Regards,Deva

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add an inner aggr() to your original expression:

aggr(if(aggr(Count({<Year={'*'},Week={'*'},Type_ID={'RO'}>} distinct OrderQty),ArticleNo)>0, 'Repeat', '0'),ArticleNo)

And this only makes sense to me if you move this dimension after ArticleNo in the chart.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

devarasu07
Master II
Master II
Author

Hi Rob,

It's working fine now, Thanks

Regards,

Deva