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

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

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

View solution in original post

8 Replies
luismadriz
Specialist
Specialist

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
Partner - Master III
Partner - Master III

try:

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

ashishpalkar
Creator III
Creator III
Author

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

Anil_Babu_Samineni

Can you please provide sample file

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
OmarBenSalem

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
Creator III
Creator III
Author

‌file

OmarBenSalem

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
Creator III
Creator III
Author

Thanks Omar , its working fine..