Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
harjotsingh16
Contributor II
Contributor II

Distinct Count for KPI by excluding Null or Space value of Column

Hello 

 

I am facing issue in doing count to create KPI, below is the scenario 

 

I want to do distinct Count of "Shipment#" column where "CostLabel" column is having value, if "Costlabel" is Null then it should exclude the value. 

The data show for Null in cost label is below

harjotsingh16_0-1696601461023.png

Please assist me in this. 

 

Thanks

 

Labels (5)
1 Solution

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

You can try something like:

Count (Distinct {<[CostLabel]={*}>} [Shipment#])

View solution in original post

5 Replies
vincent_ardiet_
Specialist
Specialist

You can try something like:

Count (Distinct {<[CostLabel]={*}>} [Shipment#])

harjotsingh16
Contributor II
Contributor II
Author

Thanks !!

This worked !

harjotsingh16
Contributor II
Contributor II
Author

I have one more question, If you can help me 

I want to do sum of all shipments  with same logic 

 

Sum of column "Weight" having distinct "Shipment" and does not include null value from "CostLabel"

 

can you help me in this?

BrunPierre
Partner - Master
Partner - Master

Try

=Count(Distinct {$<Costlabel = {"*"}>} Shipment#)

vincent_ardiet_
Specialist
Specialist

When you say  'having distinct "Shipment"', do you mean at least one shipment with a costlabel?
If this is the case something like this should also work

Sum( {<[CostLabel]={*}>} [Weight])