Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
datagrrl
Creator III
Creator III

Is it possible to get lines for multiple dimensions on a line chart?

I have multiple dimensions I can select from. The goal is to plot each dimension attribute as a line. In this example I have products and countries.

If no product or country is selected I want to aggregate all values. If any of the attributes are selected to filter by, I want those plotted.

 

I can do that pretty easily with one dimension using:=if(GetSelectedCount(Product)>0,Product,NULL())

The question is how to add the second(and ultimately the six I need for the real project).

This is what it would look like of no Products were filtered

ChartOne.PNG

And this (very messy, but was trying to show the idea) if there were filtered values for both Product and Country

Chart2.PNG

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

See the attached. Check your script  in which I have added one inline table in the end. Refer to last sheet of QVW

 

View solution in original post

3 Replies
Kushal_Chawda

What if just product is selected and not country? Do you want to show just those products?

Kushal_Chawda

See the attached. Check your script  in which I have added one inline table in the end. Refer to last sheet of QVW

 

datagrrl
Creator III
Creator III
Author

Thank you so much. We thought of a solution similar to this after I posted it. Your solution takes out an extra step we added of creating the formulas for every possible value and loading them as variables.

Your solution also involves a lot less expressions.

I know the scale will be off when all products or countries are selected. We will deal with that once we know if the business users like it this way.