Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked Chart

Hi,

I have a simple chart:

chart.png

showing the customers count by profit value.

the dimension is: Years.

the 3 expressions are: Count(DISTINCT DEPTID) //depid is customer

i also have a variable that can calculate the profit percent,

and i want to split the customer by that percent.

the variable is: ((sum(AMOUNT)/sum(TIMESPENT))-[TARGET_PRICE])/[TARGET_PRICE].

the question is how to split the bars by that variable? i can't put the varible into set analysis,

is there a way to do it?

thanks for any help, and sorry for bad english.

4 Replies
settu_periasamy
Master III
Master III

Hi,

Can you post the sample qvw?

Digvijay_Singh

May be something like this can be derived -

Count({<DEPTID={"=$(vProfit)>0.10"}>}DEPTID)

jonathandienst
Partner - Champion III
Partner - Champion III

If you want this to be dynamic (ie the user can change the target amounts), you will need to do this through a calculated dimension. If it is static (not subject to user selections), then you should do this in script and set a derived variable for (profitable, average, unprofitable).

You have not defined how the 3 bands are assigned. If you provide more information, preferably a qvw sample with representative data, and explain in more detail exactly how the profit would be determined and banded, then you will get more detailed help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

plz share the sample data or  set expression where you want to add your variable and also share the screen shot of chart how exactly you want to split your bars....