Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
deshikas
Contributor III
Contributor III

Set Analysis Doubles the value

I have a pivot table when I sum the values it doubles the value.

Entity   Status   Client_No    Flag    Bal    Sum(Bal)

01        Current 123                1       75        150

Sum ({<D_Status = {Current},D_Flag ={1}>} Bal)

Sum should be 75.

Tried distinct

Sum ({<D_Status = {Current},D_Flag ={1}>} Distinct Bal) this removes the duplicates but if there are other clients where Bal = 75, they are ignored.

5 Replies
trdandamudi
Master II
Master II

Can you please check you data and reconfirm... If you still  have the issue can you please post a small sample file...

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Maybe if you include single quote around the Current like this

Sum({<Status = {'Current'}>}Bal)

Hope this helps

ThornOfCrowns
Specialist II
Specialist II

You'll need to show the underlying data of the pivot to give us a chance to see the problem, I think.

m_woolf
Master II
Master II

I'm betting that you have duplicate records and that if you do:

Count({<D_Status = {Current},D_Flag ={1},Entity={'01'}>} Entity)

you'll get 2.

sunny_talwar

How about this?

Sum(Aggr(Only({<D_Status = {Current}, D_Flag ={1}>} Bal), Client_No))