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

For Straight Table expression total query

Hi All,

Is there any way we can conditionally show Total value in straight table?For example,I have 2 dimensions and 3 expressions in straight table.I have enabled Expression total option for all 3 expressions.Now I have 1 condition and if that condition is true then only we want to show total value else will show NA.

Any one have any idea how to achieve this in Straight table?

Regards,

Mayank

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

HI Mayank,

assuming

Condition    A > B end Expression  Sum(Value)

If(A > B,
If(Dimensionality() > 0,Sum(Value),'NA'),Sum(Value
))

Regards,

Antonio

View solution in original post

11 Replies
passionate
Specialist
Specialist

Hi Mayank,

For pivot table you could use Dimensionality()=0 for Total

there is a workaround in straight table

Use two Objects and hide show the two straight table based on your condition

Regards,

Pankaj

antoniotiman
Master III
Master III

HI Mayank,

assuming

Condition    A > B end Expression  Sum(Value)

If(A > B,
If(Dimensionality() > 0,Sum(Value),'NA'),Sum(Value
))

Regards,

Antonio

effinty2112
Master
Master

Hi Mayank,

                    Your best approach would be to have duplicate columns in your straight table. Each pair would have one showing the total and one that does not. Use your condition to show or hide the correct column.

cheers

Andrew

mayankraoka
Specialist
Specialist
Author

Thanks Antonio,

I have different condition for total and other values.

Regards,

Mayank

antoniotiman
Master III
Master III

Use it for each column accordin Your Conditions and Expressions

Like

Column 1

If(A > B,.........,Sum(Value))

Column 2

If( C < A,........., Count(Distinct Field))

Regards,

Antonio

mayankraoka
Specialist
Specialist
Author

Thanks,It is working .

Regards,

Mayank

mayankraoka
Specialist
Specialist
Author

Hi Antonio,

One more query:

I have checked with Pivot table for dimentionality()=0  it is working fine as expected.Will Dimenstionality()>0 will work in straight table?

Regards,

Mayank

antoniotiman
Master III
Master III

Yes also in Straight Table.

Regards,

Antonio

mayankraoka
Specialist
Specialist
Author

What I know is dimensionality()=0 Wont work in straight table.So what integer value it takes for expression total?

I am trying to understand is dimensionality()>0 is not for total?

Regards,

Mayank