Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear friends,
Suppose that I have a database with three variables (columns), with the first containing product names (strings), the second containing country names (strings) and the third containg sales (numbers). I want to build a table with the sums of sales per country for a given product.
So, I defined PRODUCT as Dimension and SUM (COUNTRY = 'Argentina' SALES), SUM (COUNTRY = 'Brazil' SALES) etc. as the Expressions, but these SUM functions are not working!
Anyone can help me please?
Many thanks in advance.
Try this
SUM ({<COUNTRY = {'Argentina'}>} SALES)
and
SUM ({<COUNTRY = {'Brazil'}>} SALES)
The syntax between the outer { and } is called SET analysis. A good place to start learning about SET analysis is in the Qlik Help Set analysis and set expressions
Try this
SUM ({<COUNTRY = {'Argentina'}>} SALES)
and
SUM ({<COUNTRY = {'Brazil'}>} SALES)
The syntax between the outer { and } is called SET analysis. A good place to start learning about SET analysis is in the Qlik Help Set analysis and set expressions
Worked! Thank you!
And excuse me too for my portuglish...
Hi,
if you are creating a table (or another chart) with country as dimension and sum(SALES) as expression Qlik will generate a chart with calculated sales-values for each dimension automatically.
Regards
Great @mlarruda !
Glad I could be of help.
To help others navigating in the community, please mark this question as answered.
-Vegar
I will. Can I ask about what I need to do if I want to add another condition? Will the formula below work?
SUM ({<COUNTRY = {'Brazil'}>} {<YEAR = {2019}>} SALES)
Thank you very much!