Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mfarsln
Creator II
Creator II

Background color expression overrides the set analysis on measures

Hi,

I have a table which has dates as dimension and visitor counts based on firms.  And i have a filter panel which only have months as filter criteria.

One of my measures is that:

sum({1<year={"2017"},ROOT_FACILITY_ID={"6"}>}visitorCount)

ROOT_FACILITY_ID is firm id.

What the users want to do is that selecting a month from filter panel and check every firm's visitor count in 2017.

Everything was fine until i wanted to apply background color to weekend days. My background color expression is;

if(num(WeekDay(date_))=6 OR num(WeekDay(date_))=0,rgb(126,90,100))

When i apply this expression, year filter that i applied in the measures becomes ineffective, and my table shows every year and every day.

I think i need to apply the same set analysis logic to background color expression. But i couldn't handle it.

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this for color

Only({1<year = {"2017"}, ROOT_FACILITY_ID = {"6"}>}
  If(Num(WeekDay(date_)) = 6 OR Num(WeekDay(date_)) = 0, RGB(126,90,100))
)

View solution in original post

2 Replies
sunny_talwar

Try this for color

Only({1<year = {"2017"}, ROOT_FACILITY_ID = {"6"}>}
  If(Num(WeekDay(date_)) = 6 OR Num(WeekDay(date_)) = 0, RGB(126,90,100))
)
mfarsln
Creator II
Creator II
Author

Thank you for the answer. It worked.