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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dunnalahk123
Creator III
Creator III

How to get Distinct Values in Chart

Hi,

Can Some one help me with my Question below

I have Multiple Rows in table Box like below

ProjectID  [Total Service Credit Balance in Hours] as Field Names

Project 1-- 280 Hours

project 1  -280 hours

Project 1--280 Hours

Project 2--156 Hours

Project 2 --156 Hours

Project 2--156 Hours

I want to value of both projects as 436 so i tried to write like below

=(AGGR(SUM(DISTINCT [Total Service Credit Balance in Hours]),[Project ID])) in Chart Properties expressions.

But it works when i select for single project ID in filters , and if i remove filter i am not getting any values in my Chart expressions.

Can some one help me here , Please Thanks.

Best Regards,

HK

3 Replies
Anonymous
Not applicable

May be Aggr inside sum. Like this?

SUM(AGGR([Total Service Credit Balance in Hours],[Project ID]))

marcus_sommer

I think that you have an issue with the data-quality and you should solve them first before trying to bypass them with complex expressions. In your case seems a data-cleaning within the script like this:

upper(trim(replace([Project ID], '--', '-'))) as [Project ID]

or maybe a mapping-solution for this suitable: Mapping … and not the geographical kind.

- Marcus

sasiparupudi1
Master III
Master III

Works Fine for me?

As Marcus says, may be  you have data quality issues in your Data Model? Pl share a sample so that we can better understand your problem?