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: 
MikeF
Contributor II
Contributor II

Only showing a row in a straight table that has a duplicate dimension

I have a straight table below that I only want to show duplicates when the estimate # is the same.  How can this be done with an expression.

Thanks/Mike

Estimate Number Estimate Date Job ID  
60-3 3/28/2022 1535  
3 4/3/2022 --  
10 4/3/2022 --  
11 12/31/2021 1478  
15 1/3/2022 1477  
22 4/2/2022 --  
24 1/3/2022 1491  
25 1/4/2022 1468  
25 5/10/2022 1554  
26 7/20/2021 1507  
27 1/3/2022 --  
28 1/3/2022 --  

 

The results should be.

Estimate Number Estimate Date Job ID
25 1/4/2022 1468
25 5/10/2022 1554
Labels (1)
4 Replies
Vegar
MVP
MVP

You need to somehow do a logical test calculating how many of each estimate number. 

What if you create an measure like this

if(count(total <[Estimate Number]> [Estimate Number])>1, true(), false())

 

MikeF
Contributor II
Contributor II
Author

I created a measure using that expression and it show all of them as "true".  

MikeF_0-1662764935958.png

 

Vegar
MVP
MVP

if(count(total <[Estimate Number]> [Estimate Number])>1, true(), false())

Maybe they are true? What happens if you use this expression 

count(total <[Estimate Number]> [Estimate Number])

and/or

count( [Estimate Number])

 

 Do you get the numbers you expect?

MikeF
Contributor II
Contributor II
Author

I found code out there that allowed me to check the count and it works.  Thanks for the followup.

  =aggr(
only({<[Estimate number]=>}[Estimate number])
& repeat(chr(160),65)
&num(
count({<[Estimate number]=>}DISTINCT [Job ID])
,'###0')
,[Estimate number])