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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count only a certain part of the text, how to?

Dear All*

I've got a question regarding the Count function on a certain bulk of data.

00-00

00-10

01-00

01-02

01-33

01-56

01-89

02-01

02-04

02-09

02-30

02-35

etc. etc. Up till 99-99


I want to make a pie chart out of this data based on the first two numbers. So basically in the example above:


2x 00

5x 01

5x 02


What I have now is that the count function does not group the numbers based on the first two. Anyone got suggestions?


Thanks in advance! (My first week using QV, hope it isnt an ultra newbie queston)


1 Solution

Accepted Solutions
brian_booden
Partner Ambassador
Partner Ambassador

Hi,

You can edit the Dimension to use an expression such as the below to get the first 2 characters:

=Left(FieldName, 2)

See example below.

Regards,

Brian

View solution in original post

1 Reply
brian_booden
Partner Ambassador
Partner Ambassador

Hi,

You can edit the Dimension to use an expression such as the below to get the first 2 characters:

=Left(FieldName, 2)

See example below.

Regards,

Brian