Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

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

)

View solution in original post

2 Replies
swuehl
MVP
MVP

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
Author

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