Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to write below condition in set analysis?
If(Country='A' and Company='A', sum(Net Sales),
If (Country='B' and Company='B', sum(Gross Sales),
sum(Total Sales)))
Thanks.
You can try this
RangeSum(
Sum({<Country = {'A'}, Company = {'A'}>} [Net Sales]),
Sum({<Country = {'B'}, Company = {'B'}>} [Gross Sales]),
Sum({<$-(<Country = {'A'}, Company = {'A'}>+<Country = {'B'}, Company = {'B'}>)>} [Total Sales])
)
Hi
try this
Sum(If(Country='A' and Company='A', (Net Sales),If (Country='B' and Company='B', (Gross Sales),(Total Sales))))
Thanks
Hi thanks for your reply. That is not the solution I want. I want the condition in set analysis.
You can try this
RangeSum(
Sum({<Country = {'A'}, Company = {'A'}>} [Net Sales]),
Sum({<Country = {'B'}, Company = {'B'}>} [Gross Sales]),
Sum({<$-(<Country = {'A'}, Company = {'A'}>+<Country = {'B'}, Company = {'B'}>)>} [Total Sales])
)
Hi
Can u tell me more about what you want exactly and if possible attach the output you want
Thanks
Did Sunny's post get you the solution you needed? If so, be sure to return to the thread and use the Accept as Solution button on it to give him credit for the assistance and let other Community Members know that worked. Here are some other Design Blog and Help links regarding Set Analysis that may help in the future:
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
If you want to search the Design Blog further, here is the base URL for that:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Help link:
Regards,
Brett