Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paolo_mapelli
Creator II
Creator II

Qlik sense straight table measure color expression

Hi,

talking about expressions, how can I refer the measure (column) itself into a color expression ?

In the above example, if "Sales" is a measure (let's say, "sum(sales_value)") what is the color expression used to alter background color ? Probably, "if(sum(sales_value)>100000,green(),white())". But if it is a more complex measure, could be possible refer itself with something like: "if([my_self]>100000,green(),white())" ?


I'm using Qlik Sense 1.0.2

Thanks.

1 Solution

Accepted Solutions
Michael_Tarallo
Employee
Employee

Hi Paolo - that will work - only if this complex expression is created in the load script as part of the data mode and not as a Measure in the list of Master Items.

Is that clear? Let me know if you need an example.

Mike

Regards,
Mike Tarallo
Qlik

View solution in original post

13 Replies
Michael_Tarallo
Employee
Employee

Hello Paolo - I created a new thread for your discussion.

Check this out Color by Expression

Let me know if this is what you need:

Please mark the appropriate replies as helpful / correct so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
paolo_mapelli
Creator II
Creator II
Author

Hi Michael,

not exactly. In your example you have "if(Sum([Sales Margin Amount])/...". In my case I've a "pre-defined" and complex measure as column in my table (named "DoD pct."). I'd like to write my color expression with something like "if([DoD pct.]/...", in other words a way to refer the column I'm writing in the color expression, by absolute (column/measure name) or relative (e.g. "myself","this") id.

Michael_Tarallo
Employee
Employee

Hi Paolo - that will work - only if this complex expression is created in the load script as part of the data mode and not as a Measure in the list of Master Items.

Is that clear? Let me know if you need an example.

Mike

Regards,
Mike Tarallo
Qlik
paolo_mapelli
Creator II
Creator II
Author

It is a Master Item...

Do you plan to add this feature in next Qlik Sense releases ?

Thanks again.

Paolo.

Michael_Tarallo
Employee
Employee

Hi Paolo,

Yes it is on the roadmap to make various improvements such as this.

If you can, please mark the appropriate replies as helpful / correct so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
robert99
Specialist III
Specialist III

Agree

Hopefully this is planned for a future release

Otherwise it defeats the purpose a bit of having pre-defined measures set up in this way

BTW I thought Measure in the list of Master Items was a great idea. I wish they had this in QV. Variables is OK but is a bit limited

These Measure in the list of Master Items should work exactly as if they had been set up in the script. Including in colour expressions.

Including being able to further filter

eg

One measure could be included in another measure

sum ({< Customer = {ABC}>} Mastermeasure)

NB TBH I'm unsure if this can be done at present

paolo_mapelli
Creator II
Creator II
Author

I'd like to mark the answers but I don't see how to do it, even I'm correctly logged in...

Michael_Tarallo
Employee
Employee

I fixed it - the new thread i opened was not marked as a question, I modified it. Sorry about that.

Regards,
Mike Tarallo
Qlik
paolo_mapelli
Creator II
Creator II
Author

I agree with that, Master Items nesting would be another interesting and useful feature.

Ciao.

Paolo.