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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
derekjones
Creator III
Creator III

Expression in Set Analysis

Hi All

I'm scratching my head here why this isn't working and hoping someone can enlighten me on why its not working..

I have a sum calculation where I'm using set analysis to restrict the sum to the total stock on items with the same manufacturer part as the item being reported.

=SUM({$<ProductManufPart={$(=only(ProductManufPart))}>} TOTAL StockSIQty)

I've tried the above and other combinations i.e.

=SUM({$<ProductManufPart={'$(=only(ProductManufPart))'}>} TOTAL StockSIQty)

=SUM({$<ProductManufPart={=$(only(ProductManufPart))}>} TOTAL StockSIQty)

None seem to work, however when I actually put the manufacturer part instead of the expression i.e. only(ProductManufPart) for the first line is 'ABCD' then it works fine.

My thanks in advance for any suggestions.

Derek

13 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Did you checked? by hiding the column?

I meant after including that in dimension

CELAMBARASAN
Partner - Champion
Partner - Champion

Check the attached file

derekjones
Creator III
Creator III
Author

Thanks, I could do that to save unnecssary aggregation

danielrozental
Master II
Master II

It's a good idea Celambarasan, thanks. It might not work if the 2nd dimension can take several values for the the first dimension which seems is not the case here.