Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kkkumar82
Specialist III
Specialist III

Can we create bar charts in Qlik Sense with only measures without Dimensions

Hi all,

I am a new user of qliksense desktop and I am going through the pdfs given by Qliksense like Concepts in Qliksense I found that it is required in a bar chart to atleast one dimension and one measure. I am not sure why Qliksense came to that conclusion but is there any way that we can create bar  or line and bar with only measures.

Thanks

Kiran

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

You do have to add a dimension but perhaps the following example might help ?

Using a synthetic dimension ,  the dimension expression is as follows:   =valuelist('Sales','Costs')

And the Measure Expression is:  if ( valuelist('Sales','Costs') = 'Sales', sum(Sales), sum(Costs))

This will 'manufacture' the bars in the chart and then you conditionally assign a measure expression depending on the value of the manufactured expression.

Would this work ?

Capture.PNG

View solution in original post

10 Replies
Not applicable

Bar and line charts need a y and x-axis to work properly, so you always need 2 fields to create it.

kkkumar82
Specialist III
Specialist III
Author

Hi James,

Thanks for your time, my concern is in Qlik View we are able to create bar charts only with expressions and it solves some of the tasks where we don't want to use any dimension, I think it would be better if we have the same feature here also.

Thanks

Michael_Tarallo
Employee
Employee

Hi Kiran, have you thought about using the Gauge chart object?

This allows you to use only the measure without the dimension.

Also, since you are new to Qlik Sense - did you see these videos:

New to Qlik Sense Videos

Let us know how you do.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
JonnyPoole
Employee
Employee

You do have to add a dimension but perhaps the following example might help ?

Using a synthetic dimension ,  the dimension expression is as follows:   =valuelist('Sales','Costs')

And the Measure Expression is:  if ( valuelist('Sales','Costs') = 'Sales', sum(Sales), sum(Costs))

This will 'manufacture' the bars in the chart and then you conditionally assign a measure expression depending on the value of the manufactured expression.

Would this work ?

Capture.PNG

mperez1963
Contributor II
Contributor II

Mike,

In my case I'm trying to create a table without dimension, any suggestion? (In qlikview I can do this, actually I use it frequently)

Thanks,

Miguel

kkkumar82
Specialist III
Specialist III
Author

Thanks Jonathan,

Its working absolutely fine, but a small thing, actually in the expressions I want to use measures from master items using some if conditions but I couldn't do it but I have achieved it by rewriting the whole expressions in the if condition.

I thought QS alternative for dynamic variables is measures in master items but I am unable to use them in a if condition, correct me if I am work.

Thanks

kkkumar82
Specialist III
Specialist III
Author

Thanks Michael,

It works fine for one measure but it doesn't for multiple measures.

JonnyPoole
Employee
Employee

Hi Kiran - the names of Master Items cannot be referenced by other calculations just yet.  You can define dynamic variables in the script . Just to make sure you use 'Set' in the script and invoke the variable in the expression using dollar sign expansion $(variablename).

eg:

set variablename='sum(Sales)';

//---> expression is saved as a text string

usage:

if (  <condition> ,  $(variablename) )

//---> the expression is inserted , not the string

kkkumar82
Specialist III
Specialist III
Author

Thanks jon,

For sure I will try this and let you know.