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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use group & stack in dimension

Hi All

I want to convert bellow's first chart style to the second one:

Image 1.png

Image 7.png

Separate Sales number and keep Expense number(expensive1, expensive2, expensive3) stack, seems like combine group and stack style.

You can see in my QVW file, I create If function in dimension to filter the category what I want.

The expression is to get the latest data.

However, I didn't find a way to make the chart display the data like the second chart.

Does someone could give me a suggestion to work it out.

Thx...

1 Solution

Accepted Solutions
Not applicable
Author

I got the solution, just create one table in script to sort type, the chart will separate Sales from Expense.

Image 10.png

View solution in original post

7 Replies
Anil_Babu_Samineni

I assume, Rather creating If condition in UI you can do same in script. And then call them it as ValueList() then look into the Iv condition with ValueList() option to get 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
vinieme12
Champion III
Champion III

what is the expression for the grey bar?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

See attached

barchart_sample4.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Hi Vineeth

I adjust the second chart in my original topic, I want to display Sales data in one bar, and display all of the Expense data(expensive1, 2, 3) in another one.

I checked your expression, seems you fix the condition, like '16B Budget Total', but in my actual environment, this field will contain more conditions, like '16B Budget Total, 17A Budget Total, 17B Budget Total' and so on. It will be very complex to write the expression.

I just wonder based on my expression, whether I can create chart like the second style as I pasted.

vinieme12
Champion III
Champion III

Can you post a sample that best represents what you are working with?

also can you write the expression for the grey bar?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

The second chart I didn't work out, so I just use PS for reference.

As bellow's pic, I want to move Sales data outside, not stack all of the expensive and sales data together.

Image 8.png

Not applicable
Author

I got the solution, just create one table in script to sort type, the chart will separate Sales from Expense.

Image 10.png