Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Expression after horizontally listed expression

How can I add an expression after a horizontally listed expression without it falling under the horizontal values? In the case below, I want to list the sum of sales for each customer# after the last Product column value.

Capture.PNG

So I DONT get this result:

Capture1.PNG

1 Solution

Accepted Solutions
MVP
MVP

Re: Expression after horizontally listed expression

You can use partial sums (AKA subtotals / totals, which you can enable in presentation tab per dimension) and use dimensionality() resp. secondarydimensionality() to switch your one expression to show your discount percentages in your detail columns and the sum in your total column.

Something along these lines:

=if(SecondaryDimensionality() = 0,

          YourSumExpression,

          YourPercentageExpression

)

2 Replies
MVP
MVP

Re: Expression after horizontally listed expression

You can use partial sums (AKA subtotals / totals, which you can enable in presentation tab per dimension) and use dimensionality() resp. secondarydimensionality() to switch your one expression to show your discount percentages in your detail columns and the sum in your total column.

Something along these lines:

=if(SecondaryDimensionality() = 0,

          YourSumExpression,

          YourPercentageExpression

)

Not applicable

Re: Expression after horizontally listed expression

Excellent answer swuehl! That worked perfectly. Any suggestions on how to format the two ( sales, percent ) seperately? I currently have my expression formated as "Fixed to" 1 decimal place and "Show in Percent%" which is fine for the percentages but not the sales.

Here's my expression now:

If(SecondaryDimensionality() = 0, If(Sum([Discount Percent]) > 0, Money(Sum([Sales Amount]))), [Discount Percent])

Capture.PNG

Community Browser