Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to show Min(x) at child level and Sum(x) at parent level in Qlik Sense Pivot table

Hi,

I have a requirement, tried a lot to solve but didn't find any solution. This requirement is a bit difficult to put in words, so I am trying to explain this with an example. The requirement is as described below,

* I have data that looks similar to the image below.

Req_Source.PNG

* The expected output when the Pivot table is fully expanded is as shown in the below image.

Expected_Output.PNG

* Here the lowest level in the Pivot table is City and the client wants to display distinct "X" value for "City" and sum(X) when it comes to "State" and "Region" Levels.

I thought displaying Min(X) for "City" and Sum(X) for "State" and "Region" levels would work, but I don't have any idea how to implement that practically as I am completely new to Qlik Sense.

It would be a great help if somebody could help me in finding a solution for this requirement.

Note: The column "X" in this case is a dimensional column with numerical data.

Thanks in advance,

Ravi

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

=If(Dimensionality() = 3, Min(X), Sum(X))


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

May be like this:

=If(Dimensionality() = 3, Min(X), Sum(X))


Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny,

It worked. Thank you so much.

Sajid_Mahmood
Creator
Creator

Hi Is this applicable to Qlik-sense as well since your reply show qlikview sreen

Anonymous
Not applicable
Author

Hi Sajid Mahmood,

This is applicable to Qlik Sense. I tried it in Qlik Sense and it worked.