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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
johnnyjohn
Creator II
Creator II

Plot columns on x-axis in line chart (without cross table)

Hi, 

I'm looking for a way to show data as seen on the line chart below, where x-axis has the different times.

The raw data table has the values as columns, while the line chart has these values as x-axis, where the values for each time is average over the order IDs. 

The line chart was done with a cross table, but I essentially need to create 16 of those crosstable to look at different data attributes. 

I'm looking for a way to accomplish the same thing without creating additional tables. Any ideas? 

johnnyjohn_0-1675929217955.png

 

Labels (3)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

It's just a dimension column! 

You can replace it with a valuelist() dimension

 

Dimension

=Valuelist ('1m','5m','10m','15m','20m')

Measure

=If ( Valuelist ('1m','5m','10m','15m','20m')='1m' , sum(1m)

 ,If ( Valuelist ('1m','5m','10m','15m','20m')='5m' , sum(5m). ....... And so on for each 

 

 

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

View solution in original post

5 Replies
vinieme12
Champion III
Champion III

life will be easier with the Time dimension as row values instead of columns

I'd suggest using crosstable load

 

or else you will have to write an expression for each time value column!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
johnnyjohn
Creator II
Creator II
Author

Hey. So I have used the crosstable load (you can see on the pic, the table on the right is the data of the crosstable and the graph uses that data). My question was how you would do it without using a cross table / creating a new table. How would you do it with an expression for each time? 

 

vinieme12
Champion III
Champion III

Create a Dummy Dimension, example below

tempTime:  

//Using Dual() for sorting the dimension on numeric value

Load Dual(TIME_Axis,recno()) as TIME_Axis  Inline [

TIME_Axis

1m

5m

10m

15m 

20m

];

 

In Charts add measure as below

 

Dimension 

TIME_Axis

Measure

=Pick( TIME_Axis

, sum(1m)

, sum(5m)

, sum(10m)

, sum(15m)

, sum(20m)

)

 

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
johnnyjohn
Creator II
Creator II
Author

That would create an additional though wouldn't it (tempTime)? I'm looking for a way that doesnt need a new table to be created. I have 16 different type of tables like I need to show and need want to avoid creating new tables for each.

vinieme12
Champion III
Champion III

It's just a dimension column! 

You can replace it with a valuelist() dimension

 

Dimension

=Valuelist ('1m','5m','10m','15m','20m')

Measure

=If ( Valuelist ('1m','5m','10m','15m','20m')='1m' , sum(1m)

 ,If ( Valuelist ('1m','5m','10m','15m','20m')='5m' , sum(5m). ....... And so on for each 

 

 

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