Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Alternative Measures as a Group

Hello everyone,

I need to create chart with group of measure,

For example I have measure as 

i) DT(Hour)1

ii) DT(Hour)10

iii) DT(Hour)3

iv) DT(Hour)30

Is it possible to create alternative measure with DT(Hour)1 and DT(Hour)10 as 'measure 1' &  DT(Hour) and DT(Hour)30 as 'measure 3'.

The left side label show list of sum(DT(Hour)1), sum(DT(Hour)10 ),  sum(DT(Hour) ) and sum(DT(Hour)30) .

I want at the left side label having one choice either measure 1 or measure 2, but still displaying the same graf.

2 Solutions

Accepted Solutions
Highlighted
Contributor II
Contributor II

As per your requirement,

1. At first add this measure 'DT(Hour)1',

    then go to 'Alternate Measures' and add 'DT(Hour)10'

2. Now, again go to  'Measure' section and add 'DT(Hour)3'

     then go to 'Alternate Measures' and add 'DT(Hour)30'

 

Sourav Das

View solution in original post

Highlighted
Partner
Partner

Create a logical island field in the script or a variable. For example a logical island field Select Group:

WhateverTableName:
load * inline [
Select Group
Group 1
Group 2
];

In the front end show that field to allow users to select which group.

Then change expression 1 to:
if([Select Group]='Group 2', sum(DT(Hour)10), sum(DT(Hour)1))

Change expression 2 to:
if([Select Group]='Group 2', sum(DT(Hour)30), sum(DT(Hour)3))

Fei

View solution in original post

3 Replies
Highlighted
Contributor II
Contributor II

As per your requirement,

1. At first add this measure 'DT(Hour)1',

    then go to 'Alternate Measures' and add 'DT(Hour)10'

2. Now, again go to  'Measure' section and add 'DT(Hour)3'

     then go to 'Alternate Measures' and add 'DT(Hour)30'

 

Sourav Das

View solution in original post

Highlighted
Contributor
Contributor

Thanks for reply,

It didn't work out exactly as I wanted it to, but it helped me to solve the other problems.

Highlighted
Partner
Partner

Create a logical island field in the script or a variable. For example a logical island field Select Group:

WhateverTableName:
load * inline [
Select Group
Group 1
Group 2
];

In the front end show that field to allow users to select which group.

Then change expression 1 to:
if([Select Group]='Group 2', sum(DT(Hour)10), sum(DT(Hour)1))

Change expression 2 to:
if([Select Group]='Group 2', sum(DT(Hour)30), sum(DT(Hour)3))

Fei

View solution in original post