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

sum of Rows in a table

Hi!

I have a table

Column(1) = class(sales, 500)

Coulmn(2) = count (distinct Brand) / count (distinct total Brand)

Screenshot_61.jpg


The problem is that the column(2) does not sum up to 100%. I know the reason - some of my Brands have zero on negative Sales, or just don't have names (accounting software bug). I solved this by "Not showing zero values" in the Dimension in table properties, but I need to do something with Column(2) in order not to count those values as well.


The easiest way is to calculate Sum of Rows of the Column (1) and redo the formula:

Column(2) = Column (1) / [sum of rows of column (1)]


Is the way to achieve this? In fact i need a reference to a total (50 in my example).


Thank you

11 Replies
sunny_talwar

If the above worked, then this should also work

Count(DISTINCT [Brands])/Count(TOTAL DISTINCT {<Brands = {"=Sum(InventoryBalance)/Sum(Sales) > 0"}>} [Brands])

simondachstr
Luminary Alumni
Luminary Alumni

Great use of the Vizlib Table