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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Markbhai
Creator
Creator

Displaying a count in a table

I have data which has Activities in one table and Assets in another table, and since an Asset can be related to mant activities and also an Activity can be related to many Assets, we have a Activity - Asset Mapping Table.

I am listing all activities in a table and am looking for a way to display which Assets are associated with the Activity.

I am satisfied with just showing a count of the Assets in a field, so I have created a Measure in the table called 'Associated Assets' and I would like this to display a number.

I am using the following but get a zero count even when the Activity has Assets.

 

= SUM(AGGR(COUNT(DISTINCT IF(Activity_ID = {'*'}, Asset_ID)), Asset_ID))

Thanks

Mark. 

Labels (1)
1 Reply
Markbhai
Creator
Creator
Author

Ignore... - It seems I was in a over complicating mood.

 

Adding the measure count(DISTINCT [Asset_id]) was all that was needed.