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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension related issue in Pivot table?

i have one report attached Qvw file

in that i created one pivot table

the measure expression like this

See first table in Qvw file

horizontally i add Year,Quarter and Month

by default The table showing Year wise (That means Last month year value )

if user expand one level down the table showing Quarter values( That means Last month Quarter value)

the below expression is working fine for 3 Dimension

now issue with user trying to add more dimensions horizontal Please check second table Qvw file

if user add more dimesnions still i want show only if year _> last month year

if quarter -> last month quaeter.

if(SecondaryDimensionality()=3,sum( Amount),

if(SecondaryDimensionality()=2,sum( Amount*_LastMonthQuarterFlag)

,sum( Amount*_LastMonthYearFlag)))

please help

Labels (1)
5 Replies
sunny_talwar
MVP
MVP

May be this

if(SecondaryDimensionality()=4,sum( Amount),

if(SecondaryDimensionality()=3,sum( Amount*_LastMonthQuarterFlag)

,sum( Amount*_LastMonthYearFlag)))

Not applicable
Author

Thanks sunny

i tried 4 th dimesnion its working fine

if user add 5 th or  n nof  dimensions that expression not working

sunny_talwar
MVP
MVP

Based on the number of pivoted dimensions, your expression will have to change every time.

Not applicable
Author

if user add n' of dimensions pivot should show if Year -> Year Last month value

if quarter ->Quarter Last month value

Not applicable
Author

any help that would be a great.