Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
jadams123
Contributor

Need help adding data

Hello Experts:

I am a front end user of Qlik. I dont have admin access. 

I have a problem and it goes something like this:

This is my straight table:

The formula to get below info is: Sum({$<Brand={'GREEN'}>}[# Amount])

REGIONTerritoryTerritory Sales
WestZZ6$1535
WestCOMBINED$2831
WestABC$594
WestZZ5$2810
WestXYZ$858
WestZZ4$1118
WestZZ3$1267
WestZZ2$1936
WestZZ$20

 

I want to do something like this:

=if(

Territory={'COMBINE'},

(Sum({$<Territory={'COMBINE','ABC','XYZ'},Brand={'GREEN'}>}[# Amount]),

Sum({$<Brand={'GREEN'}>}[# Amount])

)

Basically, I want to end up with "Combine" province Sales number as ($2831 + $594 + $858) instead of $2831.

I have also tried this formula but it doesn't work:

=if(

Territory={'COMBINE'},

((Sum({$<Territory={'COMBINE'},Brand={'GREEN'}>}[# Amount]) 

+

(Sum({$<Territory={'ABC'},Brand={'GREEN'}>}[# Amount]) 

+

(Sum({$<Territory={'XYZ'},Brand={'GREEN'}>}[# Amount])),

Sum({$<Brand={'GREEN'}>}[# Amount]))

I am not sure if there is a solution for this or not but at this time I am willing to try anything. 

Also if you find, comma of brackets mistake do highlight but try to look past it as I have tried to make sure the brackets and commas are correct. 

Thanks, 

J

1 Reply
jadams123
Contributor

Re: Need help adding data

Another note:

 

I dont want to go through dimensions. I have tries this formula and it combines all 3 rows into one. But I want 3 separate rows. 

=if(Wildmatch(Territory,'COMBINE',’ABC ,'XYZ'), ‘COMBINE ALL TERRITORIES’,Territory). 

For some reason my expressions wont combine the multiple territories. 

 

Thanks, 

J