Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, so i'm having this trouble that is keeping me from advancing in my Project. Keep in mind that i'm not very well trained in the expresions theme because of the lack of content about it (considering i'm starting from scratch, and in my company theres no one with the enough knowledge to teach me).
So here's the thing, I have information in such way that every App I've got has many dates of revision asociated, and in every date, there are 3 values (security, portability and global percentage of performance). With this, I have a gauge, and I need to program the expression so it turns red when the security percentage from the last date is lower than the security percentage from !the second last date and Green when otherwise. So far I only know that I need an if so I can ask wich of both values is lower, being the THEN statement the RGB() function that will set the color in my gauge. What I dont know is how I can reference to both values so I can compare them, and there seems to be no function to help me with this.
Sadly, I have been searching through documents, files and every tutorial I have found (including blogs, qlik community, tutorials of clik and so on) finding no answer to my question.
If you need more information, I will gladly upload it so you can see it.
(Pardon me for my english, I'm from southamerica)
(I'm using QlikView 12)
Regards,
Lino.
Hi Lino,
All you require is set analysis.
It would be easy to assist you if you post some sample data.
Regards,
Kaushik Solanki
Sure, here goes. Basically, there is a table that has the ID of the App as primary key, and the name of it. In the other table, the id_app is as a foreign key, and there are other fields as date, security, portability and global performance.
For example, here the security performance from the last date is less than the performance of the last second, this is exactly what I need to program.for the gauge to turn red.
I checked set analysis too, but since I have no license for the program, I cannot open other files that are not mine, and that is a big restriction for learning.
Aprecciate the help, Kaushik.
Regards
Hi,
Here we go. Use below expression in text box.
If(only({<date = {"$(=Max(Date))"}>}Security) <= only({<date = {"$(=Max({<Date = {"<$(Max(Date))"}>}Date))"}>}Security), Red(), Green());
Make a selection on Id_App.
Regards,
Kaushik Solanki
Hi Kaushik, sorry for not responding earlier but I have the information at my job, so there's nothing I can do on weekend.
I'm having a problem with the expression you gave me on the second part of the if, here goes an image.
Really apreciate the help though.
Regards,
Lino cortés
You cannot have double quotes within doube quotes, try this may be:
{"$(=Max({<Date = {'<$(=Max(Date))'}>}Date))"}
Hi Sunny,
That solves the syntax problem I was having with the expression, but the gauge still doesn't turn red or green.
Regards,
Lino Cortés
Do you have a sample you would be able to share?
Sure, here goes what I have so far on QlikView. The gauge's expression seems to be the only thing that's keeping me from advancing in the Project.
Regards
Could it have something to do with the fact that the percentages i'm uploading are in text format?