Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Daryn
Creator
Creator

Creating a new dimension?

Hi all, 

Thanks for taking the time to read this and hopefully assist me.

I am looking to show (in a pit chart if possible) so was trying to create a dimension for the 'slice'. 

We have an order number, with two date fields. In my load script I have set:

    [Order],

    [Order] = [Actual Order Finish Date] > [Basic finish date] AS [LATE],

    [Order] = [Actual Order Finish Date] < [Basic finish date] AS [EARLY],

    [Order] = [Actual Order Finish Date] = [Basic finish date] AS [ON TIME],

 I can show these as individuals count values or such, but want to create a dimension that as mentioned can be used in a pie chart, that will just give 3 slices. If I use them as they are I end up with each Order as a slice.

Daryn_0-1662452130049.png

 

I hope that makes some sense?

I just want three slices and to report as 'count' of quantity of orders within that range.

something like;

Daryn_2-1662452343834.png

 

I have a bar chart, but really want to show this as a pie if possible.

Daryn_3-1662452428312.png

Using a date dimension and three versions (one of each for early, late, on time by switching the > < 😃 of;

Count ({<Order = {"=[Actual Order Finish Date] > [Basic finish date]"}>}Order)

// Late

 

If I convert that to a pie chart I get;

Daryn_4-1662452622932.png

Thanks in advance for your help, as always.

Regards Daryn

Labels (1)
2 Solutions

Accepted Solutions
Or
MVP
MVP

These seems like a really clunky approach. I'd suggest using, in script, something like:

if([Actual Order Finish Date] > [Basic finish date] ,'LATE',

if([Actual Order Finish Date] < [Basic finish date] ,'EARLY',

if([Actual Order Finish Date] = [Basic finish date] , 'ON TIME'))) as [Order Finish Status]

 

You would then use this as your chart dimension.

If for some reason that approach is not feasible, you could try using a calculated dimension:

Coalesce([LATE],[EARLY],[ON TIME])

View solution in original post

Daryn
Creator
Creator
Author

And this is why you are a Champion 👍

Daryn_0-1662453877298.png

Thanks Or, superb help as always and very much appreciated. /bow.

Daryn

View solution in original post

2 Replies
Or
MVP
MVP

These seems like a really clunky approach. I'd suggest using, in script, something like:

if([Actual Order Finish Date] > [Basic finish date] ,'LATE',

if([Actual Order Finish Date] < [Basic finish date] ,'EARLY',

if([Actual Order Finish Date] = [Basic finish date] , 'ON TIME'))) as [Order Finish Status]

 

You would then use this as your chart dimension.

If for some reason that approach is not feasible, you could try using a calculated dimension:

Coalesce([LATE],[EARLY],[ON TIME])

Daryn
Creator
Creator
Author

And this is why you are a Champion 👍

Daryn_0-1662453877298.png

Thanks Or, superb help as always and very much appreciated. /bow.

Daryn