Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dysjd
Contributor
Contributor

Convert Measure to Dimension

Hi Qlikers, 

I'd like to convert a measure into dimension so that we can do counting on that. 

Below is a simple example:

Customer   Price 

A                    1.0

B                    1.0

C                     1.1

D                     1.2

E                     1.2

F                     1.2

 

We have price (measure) for customer above, and want to count Number of Customers on price based. Below is what we want:

Price   Num of Customers

1.0         2  (A&B)

1.1         1  (C)

1.2         3  (D&E&F)

Appreciate if if anyone could advise how to achieve this in Qlik Sense front end? I mean not do the conversion in script. 

Thanks!

Derek

1 Solution

Accepted Solutions
sunny_talwar

Try this

Dimension

Price

Expression

Count(DISTINCT Customer)

View solution in original post

3 Replies
prathipsrinivas
Creator
Creator

You can convert measures into intervals using class function.

See class function for more details.

Hope this helps.

Prathip
sharvanibc
Partner - Contributor II
Partner - Contributor II

Hi,

Simple way (eg: if trying to achieve in a bar chart)  is taking  Price as a dimension and Count(distinct Customer) as measure ,gives count of distinct customers against appropriate Prices. 

Hope this helps,if this is the requirement.

sunny_talwar

Try this

Dimension

Price

Expression

Count(DISTINCT Customer)