Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
zela9123
Contributor
Contributor

Unique values (deduplication)

Hi All,

I am struggling with the following task in Qs.

As is:

Reference No.Status
A001low
A001medium
A001high
A001low
A002medium
A002medium
A003high
A003high

 

To be:

Reference No.Status
A001low
A001medium
A001high
A002medium
A003high

 

My input table contains duplicated statuses for the same reference number. I would like to present unique statuses for each reference number, so I could show percentage breakdown chart.

I look forward to hearing from you.

4 Replies
Taoufiq_Zarra

Maye be :

Data:

load distinct * ;

LOAD * INLINE [
    Reference No.,Status
    A001, low
    A001, medium
    A001, high
    A001, low
    A002, medium
    A002, medium
    A003, high
    A003, high
];

 

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
zela9123
Contributor
Contributor
Author

Hi,

Thanks, but I would like to use the formula in expression, when I am creating bar chart (there are corresponding data for those which are duplicate and I will need them for another analysis, so I do not want to 'loose' it).

As a dimension I would use 'Status', and I need to find expression which will remove duplicates from those 2 columns.

 

Regards,

Zela

Saravanan_Desingh

I am still trying to understand your requirement. I might be wrong.

You can simply add both of them in the Dimension to get the Unique. Though you see the unique, still the aggregation expression will be applicable to all data.

If I need to understand more on your requirement, can you share your Expression which you are trying.

commQV33.PNG

 

Kushal_Chawda

 As you are using status as a dimension, you can simply use the  below expression to remove duplicates

=Sum(distinct Value)

If it is not working please share the sample data with expected output