Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
valantis21
Contributor
Contributor

Qlik Sense Sum of measure where dimension is Distinct

Hello guys, a quick question.

I am searching a way to sum up the below Measure where:

code is distinct AND H Level = CDI AND TIME = mtd.

code H Level Team RM TIME product Measure
a CDI A A mtd 1 10
a CDI A B mtd 2 10
a CDI A C ytd 3 10
b CDI A A mtd 1 10
b ACCOUNT A B mtd 2 10
b CDI A C ytd 3 10

So expected to get a result:

cdi pfa
a 10
b 10

I have found that aggr - sum function with distinct creates a temporary table with unique values but I could find a way to combine aggr - sum with set analysis for H level and TIME .

Thanks in advance

Labels (1)
3 Replies
vinieme12
Champion III
Champion III

sum({<TIME={'mtd'},[H Level]={'CDI'}>}distinct Measure)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Valantis
Contributor
Contributor

This does not result in Distinct Codes , we need aggr sum for this but i cannot find a way to use aggr sum with above set analysis f.e

Valantis
Contributor
Contributor

F.E if you have 2 codes with same measure as above is will result in keeping only one code (f.e a code)