Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
dries_clairhout
Contributor

No results in calculation

Good day,

 

Dimension: if(Category = 'TOTAAL or Category = 'AANKOPEN, Category)

Calculation:

 

-(if(Category = 'TOTAAL',if(Sum(GLE15_CR) > sum(GLE15_DB), sum(GLE15_CR) - sum(GLE15_DB)) &' '& if(Sum(GLE15_DB) > sum(GLE15_CR), sum(GLE15_DB) - sum(GLE15_CR)

)))


-(Beginvoorraad - sum(Amount) / BrutoMarge + sum(VoorraadAmount) - Beginvoorraad)

+


if(Category = 'AANKOPEN',if(Sum(GLE15_CR) > sum(GLE15_DB), sum(GLE15_CR) - sum(GLE15_DB)) &' '& if(Sum(GLE15_DB) > sum(GLE15_CR), sum(GLE15_DB) - sum(GLE15_CR)))

 

 

 

I get no result from this,

But if I for instance remove the if statement for category in the last calculation, it does work, but of course not what I want. Any ideas? maybe too much statements in one calculation?

 

Thanks a bunch.

3 Replies
Highlighted
Partner
Partner

Re: No results in calculation

First thing I can see is the syntax error in dimension calculation

try

if(Category = 'TOTAAL' or Category = 'AANKOPEN', Category)

Highlighted
dries_clairhout
Contributor

Re: No results in calculation

hi,

 

thanks for your answer.

But I just mistyped here, it is correct syntax in the application itself.

But thanks for the answer.

Highlighted
Partner
Partner

Re: No results in calculation

Ok.. Lets try this part first

 

(if(Category = 'TOTAAL',
if(Sum(GLE15_CR) > sum(GLE15_DB), (sum(GLE15_CR) - sum(GLE15_DB)),sum(GLE15_DB) - sum(GLE15_CR))

))


-(((Beginvoorraad - sum(Amount)) / (BrutoMarge + sum(VoorraadAmount))) - Beginvoorraad)