Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

how to get specific info in a text box

I have three dimensions: Revenues, Countries and Products. I have a "Text Box" where I want to see the revenues for an specific product for Germany. On the other side I have a "List Box" menu where I can select the products.

I have the following formula in the "Text Box": "=sum(Revenues)", so when I select a product I get all revenues for this product but for all countries.

What I want is to be able to select a product from the "List Box" menu and to get the revenues in the "Text Box" but only for Germany (withouth the need of creating a new "List Box" where to specifically select Germany)

Please help !

thanks,

dani

1 Solution

Accepted Solutions
Not applicable

Hi Dani,

Try below in Text box give this expression sum({<Region={'Germeny'}>} Revenue)

Santhosh

View solution in original post

5 Replies
Not applicable

Hi Dani,

Try below in Text box give this expression sum({<Region={'Germeny'}>} Revenue)

Santhosh

dmohanty
Partner - Specialist
Partner - Specialist

Try below and see if this helps:

 

=sum({<Countries = {'Germany'}>}Revenues)

danialier
Creator III
Creator III
Author


Great it works now !

But I have anoter question: I added a fourth dimension for Customers. Now I want to select a product from the List Box and get as a result the revenues for Germany, for the customer AAA for the specific product selected.

This is the formula I'm using but is not working...

=sum({<Region={'Germany'}>} {<Customer={'AAA}>} Revenues)

Please help !

Another question, what else do I need to add to this formula in order to get the "Text Box" outcome in % or with miles separator (like 54% or 0.54)

Thanks !

dmohanty
Partner - Specialist
Partner - Specialist

Hi Dani,

It would be like this:

=sum({<Countries = {'Germany'},Customer= {'AAA'}>}Revenues)

For 2nd question, try like this:

=num(sum({<Countries = {'Germany'},Customer= {'AAA'}>}Revenues) / sum(TOTAL(Sales),'#.##') -------- For output like 0.54

= num(sum({<Countries = {'Germany'},Customer= {'AAA'}>}Revenues) / sum(TOTAL(Sales)*100,'#.##')  & '%' ------ For output like 54.00%

= num(sum({<Countries = {'Germany'},Customer= {'AAA'}>}Revenues) / sum(TOTAL(Sales)*100,'#.')  & '%' ------- For output like 54%

Regards!!!

danialier
Creator III
Creator III
Author

excellent thanks !