Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Cobran53
Contributor II
Contributor II

In an expression, how do I get the color of a dimension?

Hey ! 
I have this dimension, defined like this 
`

=   If(Age<=1, Dual('Less than 24 Hours', 1),
If(Age<=2, Dual('Between 24 & 48 Hours', 2),
    If(Age<=3, Dual('Between 48 & 72 Hours', 3),
        If(Age<=7,Dual('Between 72 Hours & 1 Week', 4),
            If(Age<=14,Dual('Between 1 & 2 weeks', 5),
                If(Age<=30,Dual('Between 2 weeks & 1 Month', 6),
                    If(Age<=90, Dual('Between 1 & 3 Months', 7),Dual('More than 3 Months',8))))))))

`
For each of those values, a color is attributed, via the "value colors" tab. I'd like to be able to access this color in an expression for conditional coloring shenanigans. Is that possible? 

PS: I know the code is improper, but i've been assured by my colleague it was the only way in this particular case. Apologies to you all. 

Labels (1)
  • SaaS

1 Reply
Cobran53
Contributor II
Contributor II
Author

Well, since I didn't get a response, I hard-coded it into the expression. I'm leaving this open just in case it is indeed possible, or it gets added later on