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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

2 requirements in a Single Chart

Hi All,

I have a requirement like this, where I have 2 dimensions: SBU, Quarter and a Measure: Revenue

  • In a Bar chart I am showing the Total Revenue for different SBU by Quarters (where SBU is 1st dimension and Quarter is 2nd). THAT I AM ABLE TO DO LIKE BELOW SHOWN

Bar.jpg

  • Now on the same chart, I also have to show the total Revenue for different SBU  only (now not Quarter wise)

Can someone please help in showing one example/ideas?

Regards!!!

1 Solution

Accepted Solutions
8 Replies
MK_QSL
MVP
MVP

Add below in your script....

Considering your Fact Table is Temp:

Temp:

Load SBU, Quarter, Revenue From TableName;

Join

Load SBU, SUM(Revenue) as Revenue Resident Temp

Group By SBU;

Now Create a Bar Chart

Dimension

SBU

Quarter

Expression

SUM(Revenue)

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Manish,

Thank you for the response.

But I wanted a different chart/look which would show only SBU and Revenue. Some Button or Cyclic group kind of thing will help.

Can you help some?

Anonymous
Not applicable

Yup, a Drill Down or Cyclic group could be what you are after, so give it a go.

On the Dimension tab of your Bar Chart Properties click <Edit Groups>

dmohanty
Partner - Specialist
Partner - Specialist
Author

HI Bill,

Can you please help on this?

  • One chart would show SBU and Quarter
  • Other chart should show ONLY SBU.

But both should be in a single place (Switching by Button/Cyclic group etc)

Anonymous
Not applicable

Aaahhh !!     I understand what you are after now.

  • Create Chart with both Dimensions
  • For the Quarter tick <Enable Condition> and check whether a variable say vShowQuarter is 1
  • Create a button with suitable actions to toggle the vShowQuarter variable between 0 and 1

You test first by changing the variable in an Input Box and add the button after that test.

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Bill,

Its getting more clear to me now. But could you please help a bit, by showing a small example.

It would be really helpful!

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Bill,

This is an excellent learning.

Thanks for helping me out and showing this article. Kudos!