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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlikview variable

Guys,

I have an expression stored in a variable as below,

vBillingStatus = Aggr(Sum(MonthlyBillableWorkHour)/Count(Distinct EmployeeID),EmployeeID)

But I'm using this expression in a bar chart having three bars for the following values,

1. vBillingStatus >7, Occupied

2. vBillingStatus <4, Available

3. vBillingStatus <8 and >3, Partially Occupied

I couldn't set static colors for each of the bars in the bar chart since the value is stored in a variable. So, please help me how to solve this.

5 Replies
Anil_Babu_Samineni

Colors you want to apply

If(vBillingStatus < 4, Yellow(), If(vBillingStatus > 3 and vBillingStatus <8, Red(), If(vBillingStatus > 7, Green())))

Or

If($(vBillingStatus) < 4, Yellow(), If($(vBillingStatus) > 3 and $(vBillingStatus) <8, Red(), If($(vBillingStatus) > 7, Green())))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
yoganantha321
Creator II
Creator II

Anil it is not working

vishsaggi
Champion III
Champion III

Can you share a sample to look into? And does your variable display any values?

Anil_Babu_Samineni

How variable values are returning on your case? Would you post sample qvw which demonstrates the output

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
avinashelite

Do you have the EmployeeID in your chart as the diemsion ? if not then it won't work because your aggr on the EmployeeID ..so change the aggr based on the dimension in the chart then it will work

Hope this helps you