Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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

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

try

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

Highlighted
Creator
Creator

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

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)