Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ashishpalkar
Contributor II

Apply total of one column to another in straight table

Hi There

I am using straight table. I have to show total generated by column 2 on total generated on column 3.

Please find attached screenshot , is it Possible to perform this?

Thanks in advance,

1 Solution

Accepted Solutions
OmarBenSalem
Esteemed Contributor

Re: Apply total of one column to another in straight table

in ur first expression; change it from

count(distinct [Line Desc 1])

to:

if(Dimensionality()=0,Count( total Distinct {<AccountDesc>}[Item-Branch Key]), count(distinct [Line Desc 1]))

result:

Capture.PNG

8 Replies
luismadriz
Valued Contributor

Re: Apply total of one column to another in straight table

Hi Ashish, very strange requirement . If possible please share the reason for it... just for my general knowledge.

I learned about this possibility yesterday from celambarasan but not sure if it works. please try this on the measure you're using for products, Just replace the aggregation and the right field names:

If(Alt(Rowno(),0)=0, Sum(%Items), Count(Products))

I hope it's helpful

Cheers,

L

shraddha_g
Honored Contributor III

Re: Apply total of one column to another in straight table

try:

if(Dimensionality()= 0,sum(aggr(Sum(% of Items),Account)),Count(Products))

ashishpalkar
Contributor II

Re: Apply total of one column to another in straight table

Hi Luis

Thanks for responding , I tried with your expression however its not working.

we have one requirement to show same total for multiple columns . we can do this in excel but not sure ab

Re: Apply total of one column to another in straight table

Can you please provide sample file

OmarBenSalem
Esteemed Contributor

Re: Apply total of one column to another in straight table

in your first column, as an expression

if(dimensionality()=0, sum(total measureOfTheSecondColumn), sum(MeasureOfTheFirstColumn):

Example:

IF(Dimensionality()=0, sum(total [Car sales]), Sum([Car production]))

Capture.PNG

ashishpalkar
Contributor II

Re: Apply total of one column to another in straight table

‌file

OmarBenSalem
Esteemed Contributor

Re: Apply total of one column to another in straight table

in ur first expression; change it from

count(distinct [Line Desc 1])

to:

if(Dimensionality()=0,Count( total Distinct {<AccountDesc>}[Item-Branch Key]), count(distinct [Line Desc 1]))

result:

Capture.PNG

ashishpalkar
Contributor II

Re: Apply total of one column to another in straight table

Thanks Omar , its working fine..

Community Browser