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: 
itatspectrum
Partner - Contributor II
Partner - Contributor II

IF Count of Aggr query in a Calculated Dimension?

Hello,

I'm trying to do a Project Summary Report. My sample data is below.

ProjectRef

ProjectDesc

Customer

Value

Hours

101

Build A House

Customer1

1000

10

101

Build A House

Customer2

2000

12

102

Dig A Hole

Customer3

1500

5

The report I'm trying to is below. I want one line per Project, and where there are multiple customers I want it to say 'Multiple' in the Customer column as an example below. I've tried a calculated dimension with this expression but to no avail as yet.

=if(aggr(count(Customer),ProjectRef,Customer)<=1, Customer,'Multiple')

ProjectRef

ProjectDesc

Customer

Value

Hours

101

Build A House

<Mulitple>

3000

22

102

Dig A Hole

Customer3

1500

5

1 Reply
jharke
Creator II
Creator II

Hello

Try this one:

=if(aggr(count(Customer),ProjectRef)<=1, Customer,'Multiple')