Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Jolly
Contributor
Contributor

Qlik sense table query

Hi Al,

I have below table.

Region     sale   city      sale

US            100       A         20

                                B          30

                               C           50

Asia          200       A           100

                                 B              50

                                 C                50

Where Region and City are 2 dimension and i am taking these dimensions from 2 variables. Variables i need to use because user have to select dimension from filters. I have 2 filter i.e Region filter and City filter. When i click on City filter, i want the sum of sales of Region column to remain same.

for example, if i select City A, then Value for sum of sales for Region column should remain as 100. But region column is distributing among my city filter.

 

Is there any way i can show sum of sales of region regardless of city filter.

below is the output i am getting,

Region  sale    City     sale

US          20           A        20

US           30         B         30

US           50          C          50

The output i want is,

Region  sale    City     sale

US          100         A        20

                                B         30

                               C          50

Labels (1)
7 Replies
MayilVahanan

Hi

Try like below

Dim:Region

Measure: Sum({<City=>}Sales)

Here City=, ignore the city selection

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Kashyap_R
Partner - Specialist
Partner - Specialist

try

Sum({<city=>}Sales)

Hope this helps 

Thanks

 

Thanks and Regards
Kashyap.R
Jolly
Contributor
Contributor
Author

Hi mayilvahanan,

 

Thanks for quick response. I forgot to mention that i am using 2 variables for displaying Region and City. User has to select from filter.

Could you please let me know the same set analysis formula using variables. I am unable to crack it.

Jolly
Contributor
Contributor
Author

Hi Kashyap,

 

Thanks for quick response. I forgot to mention that i am using 2 variables for displaying Region and City. User has to select from filter.

Could you please let me know the same set analysis formula using variables. 

Kashyap_R
Partner - Specialist
Partner - Specialist

Hi 

Sorry, Can u elaborate more on what is ur requirement and if possible share a sample QVF.

Thanks

Thanks and Regards
Kashyap.R
Jolly
Contributor
Contributor
Author

Hi Kashyap,

I have 2 column, Region and City.  I have 2 filters as well as Region and City. When ever user will select Region as US, it will display US in Region column. both are 2 independent filter and column. 

i have used vRegion to get region values in region column and vCity variable to get city values in City column.

If user will select Region as US and and City as A, B,C , then sales of US should remain same as 100. It shouldn't distributed along City filter. Even though user will select City filter as A, B, still the US region sale should display 100 only.

below is the output i am getting,

Region  sale    City     sale

US          20           A        20

US           30         B         30

US           50          C          50

The output i want is,

Region  sale    City     sale

US          100         A        20

                                B         30

                               C          50

Kashyap_R
Partner - Specialist
Partner - Specialist

Try

Aggr(Sum({<City=>}Sale),Region)

Hope it helps

Thanks

Thanks and Regards
Kashyap.R