Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

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

May be like this:

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


Capture.PNG

View solution in original post

4 Replies

May be like this:

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


Capture.PNG

View solution in original post

Contributor III
Contributor III

Hi Sunny,

It worked. Thank you so much.

Creator
Creator

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

Contributor III
Contributor III

Hi Sajid Mahmood,

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