Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

hardcoding a Qlikview formula


I have a chart/straight table which works off my filters i.e. for customer, but I only want the data in the straight table to show specific data i.e. only "live" not "closed". How can I hardcode this "Open" status into a formula? field name is po.status

6 Replies
stigchel
Honored Contributor

Re: hardcoding a Qlikview formula

You can use set analysis (see help for explanation and examples), from what I can get from your explanation this would be something like

Sum({<po.status={'live'}>} Sales)

Not applicable

Re: hardcoding a Qlikview formula

Thanks for the help, I tried this but it returns \\error in calculated dimension.

I don't need the sales bit at the end,.

If I was using Microsoft Access or Microsoft Query my formula would be po.status = "Open" that is all I want to do.

I don't want to see any closed purchase orders but it seems to just show everything ever raised for the filtered customer. I have other expressions which show Sku, quantity, dates, Value etc.

I hope I've explained a little better

stigchel
Honored Contributor

Re: hardcoding a Qlikview formula

I gave you an example for the expression to use, you did not tell me what you are calculating. I try to avoid calculated dimensions and usually they are not necessary. If you use the set analysis in your expression

{<po.status={'open'}>}

in any function that takes set analysis the results will only show those.


If you must do this in your dimension, you can probably use something like

if(po.status='Open',YourDimension)

Not applicable

Re: hardcoding a Qlikview formula

Thanks.. before I posted here I have tried using {<po.status={'open'}>} as this seemed fairly straight forward, however it doesn't work for whatever reason. I am admitting defeat, and going to give up !

I will just click the data/straight table to filter off what I want, not ideal as it affects other tables in my tab but nevermind

thank you

stigchel
Honored Contributor

Re: hardcoding a Qlikview formula

It should be fairly straight forward, however it is difficult for me not seeing your qvw. If you post your qvw here I could help you further, if you're worried about data sensitivity please have a look at

Preparing examples for Upload - Reduction and Data Scrambling

Not applicable

Re: hardcoding a Qlikview formula

Its ok, I think its because the status is not set as "open" or "closed" on Sage, that uses C and 9 etc so there must be a hidden variable.

Community Browser