Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I created a line chart with:
I want to format the "Line Style" of the Expression for the different Metric_Type (SO or SI) using:
But it doesn't work!!!
But If I use an Expression without Set Analysis like:
=Sum(Values)
It Works!
Any Suggestions??
Thanks in advance,
Francisco
Use this.
=if(Only({<Month=,Year=>}Metric_Type)='SI','<S3>')
you have to ignore the fields that your are ignoring in your main expressions.
Also one suggestion...
in your qvw you are refering to mid(product,1,2) in which "product" is a dimension column label. which you can not refer like this as you can do it for expressions.
it will be nice if you share a sample QVW. i dont see a problem in your expressions.
Make sure to write your if statement in the line Style location. I added a picture to show where your expression should be written. Please note that This type of attribute expression only has effect on line, combo and radar charts. but it doesn't work with other type of charts.
Thanks and regards,
Walid
Hi Francisco,
Maybe the problem is that in your expression
=if(Metric_Type='SI', '<S1>', '<S3>')
Metric_Type is not a single value but a set of values, a condition cannot be evaluated comparing a set of values, I suggest to use an aggregation function only(), maxstring(), just be very careful as you are comparing string values.
Here more info: http://community.qlik.com/blogs/qlikviewdesignblog/2014/06/16/use-the-aggregation-functions
Hi Francisco,
Does the Metric_Type field return only value? Also, it will be easy if you can post the sample QVW.
Cheers,
DV
www.QlikShare.com
How can I share the Qvw?
I only see the options Insert Image, video and Link!
Thks,
Francisco
Whe you hit Reply on top right corner of that editor you will see Advanced Editor. Click on that and that will give you an option to upload QVW.
Hello everyone,
The sample qvw is attached.
Thanks,
FLC
Use this.
=if(Only({<Month=,Year=>}Metric_Type)='SI','<S3>')
you have to ignore the fields that your are ignoring in your main expressions.
Also one suggestion...
in your qvw you are refering to mid(product,1,2) in which "product" is a dimension column label. which you can not refer like this as you can do it for expressions.
Perfect!
Yes I know about mid(product,1,2), tha was about another issue, but I understand your point...
Thank you.