Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nvijay5757
Creator
Creator

Background color Expression

Hi,

i need to display in pivot table

1. from blue_color to end_date  (code = 'Y') ---> Blue color

2. from grey_color to end_date (code = 'N') -----> Grey color

3. if blue_color date is not available then consider as grey_color date

4. end_date ---> Green color

please help me i have tried but not reached.

like example

1.png

1 Solution

Accepted Solutions
MarcoWedel

maybe something like:

=If(Only(WeekStart(Date_Range))=WeekStart(end_date),  LightGreen(),
      If(Only(WeekStart(Date_Range))>=WeekStart(Alt(blue_color,grey_color)) and code='Y', LightBlue(),
          If(Only(WeekStart(Date_Range))>=WeekStart(grey_color) and code='N', LightGray())))

 

hope this helps

Marco

 

View solution in original post

4 Replies
MarcoWedel

maybe something like:

=If(Only(WeekStart(Date_Range))=WeekStart(end_date),  LightGreen(),
      If(Only(WeekStart(Date_Range))>=WeekStart(Alt(blue_color,grey_color)) and code='Y', LightBlue(),
          If(Only(WeekStart(Date_Range))>=WeekStart(grey_color) and code='N', LightGray())))

 

hope this helps

Marco

 

nvijay5757
Creator
Creator
Author

Hi Marco,

Thanks

the expression is working fine.

1. but in my case while applying some rows are not applying the color code. something is missing i have tried a lot can you please help me.

2. for my original qvw file this expression also not working, but test file is working, can i do any settings change.

 

markwood
Contributor II
Contributor II

Not working expression: Iif(sumSum([OrderDetailsTotal])> 1000,'green' ,'red')

Working expression (without formula): Iif(([OrderDetailsTotal])> 1000,'green' ,'red')

How to change color by conditional expression, when a formula is used?

Visit here : http://filesynced.net/

nvijay5757
Creator
Creator
Author

Hi

To display descending order of blue color and grey color like based on total number of days.