# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for
Did you mean:  Creator

## Create a dimension

Qlik experts,

Can I create a dimension based on a measure?

I need to create a chart where the dimension (x-axis) is the name of a measure. The measure is a count for grater than 8,7,6,5,4,3,2,1. The x-axis needs to be 8,7,6,5,4,3,2,1 and the y-axis is the count of custID greater than 8,7,6….

count({<Value1={">8"}>} CustID)

1 Solution

Accepted Solutions  MVP

For i = 1 to 8

Groups:

Value1,

\$(i) as Group

Resident Data

WHERE Value1 > \$(i);

Next i

Then use Group as dimension and just a Count(CustID) as expression.

5 Replies  Master II

In Dimension you can use

=if(Value1>=8,Value1)

or You can do this in script as well

Data:

Dato,

CustID,

Value1,

if(Value1>=8,Value1) as [Value8],

Value2

FROM [lib://Data/SampleData.xlsx]

(ooxml, embedded labels, table is Sheet1);

And then in front end just use [Value8] as your dimension

For measure use

count({<Value1={">8"}>} CustID)  Creator
Author

Thanks!!

Can I add more values to the dimension? Like -  if(Value1>=7,Value1),[Value7],  if(Value1>=6,Value1) as [Value6]?

And can these be grouped on top of each other? See picture below (this is created based on a calculated excel-file)   Master II

Main X-axis would be only 1 but you can add 1 more dimension thats it.

For measure you can use Multiple Alternative measures but only 1 measure can be seen at a time

As for creating buckets you can create buckets based on number....

Search for creating Age buckets in community. You'll get an idea how to create new values based of >=8 , <=5 etc  MVP

For i = 1 to 8

Groups:

Value1,

\$(i) as Group

Resident Data

WHERE Value1 > \$(i);

Next i

Then use Group as dimension and just a Count(CustID) as expression.  Creator
Author

Thanks, Stefan 