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

TCD : sum values when they are < 1

In a TCD :  How can 1 group the rows under a dimension 'Others'  when Sum(Mnt)  ​​< 1
Dimension : Type
Expression : Sum(Mnt)

Type      Sum(Mnt)
Type1    20
Type2      5
Type3   0,4
Type4   0,9
Type5   1,2

Type      Sum(Mnt)
Type1    20
Type2      5
Type5   1,2
Others 1,3

Jacques

1 Solution

Accepted Solutions
jleraille
Partner - Creator
Partner - Creator
Author

Hello,
I found a solution

Dimensions:
I calculate the total by an aggregation on the Class and Detail dimensions.
If <1 I take the fictitious dimension 'Other Class' otherwise the Detail dimension

Expression:
If dimension length Detail = 0 (fictitious Class) I accumulate the value of any dimension otherwise simple accumulation

View solution in original post

5 Replies
ignacioroman
Contributor II
Contributor II

Sorry, I don't know what is TCD, but you want to do it in the script or in a chart?

 

If it is in the scrip, you could so something like that:

Load

*,

if (sum(Mnt)<1,'Lower than 1', 'higer than 1')  as [aux sum(mnt)]

from "table"

This is assuming "sum(Mnt)" is a variable whats comes from the table.

 

If you want to do it in the chart, you can follow this picture in the charts propieties (check the points with the arrows)

ignacioroman_0-1588133799539.png

This is assuming "sum(Mnt)" is an expression.

 

  Best regards!

jleraille
Partner - Creator
Partner - Creator
Author

Hello Ignacio roman

Thanks taking time to answerd.
Sorry  TCD ("Tableau croisé dynamique" in french) is Pivot Table chart

So I would like to use the dimension limits option as for the straight table, but it is not available for the pivot table.

maybe there is another way to do that ?

I need Pivot table because I have 2 dimensions : details grouped by class (see attach file)

 

Best regards

Jacques

 

 

ignacioroman
Contributor II
Contributor II

Hello, this option must work

ignacioroman_0-1588167554516.png

If it doesn't, let me know and I'll do a test with a sample.

 

Regards!

jleraille
Partner - Creator
Partner - Creator
Author

Hello,

Sorry but (unless i'm wrong) the dimension limits option is not available for the pivot table.

Bests regards

Jacques

 

jleraille
Partner - Creator
Partner - Creator
Author

Hello,
I found a solution

Dimensions:
I calculate the total by an aggregation on the Class and Detail dimensions.
If <1 I take the fictitious dimension 'Other Class' otherwise the Detail dimension

Expression:
If dimension length Detail = 0 (fictitious Class) I accumulate the value of any dimension otherwise simple accumulation