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: 
Not applicable

Help with stright table expression

Hi,

Attached sample QVW describes the problem I am having and what output that I am expecting.

Could you please help me with the right expression?

Regards,

Murali

5 Replies
sudeepkm
Specialist III
Specialist III

Please take a look at the example attached.

Not applicable
Author

Sudeep,

Thanks for your response. But I need only one row per Carrier. As in with real data each Carrier will have 100's of policies and hence I can't repeat the carrier for each policy.

Is there any other way to achieve this?

Regards,

Murali

jerem1234
Specialist II
Specialist II

This is a weird way to show something, so it requires a little finesse. I used the formula:

=sum(aggr(pick(match(PolicyRef,$(=concat(distinct chr(39) & PolicyRef & chr(39), ','))), $(=concat(distinct 'sum({<PolicyRef = {' & chr(39) & PolicyRef & chr(39) & '}>} total Premium)',','))), Carrier, PolicyRef))

However, if you know what PolicyRef's there are and know they won't change you may hardcode them like:

=sum(aggr(pick(match(PolicyRef, 'Pol A', 'Pol B', 'Pol C'), sum({<PolicyRef = {'Pol A'}>} total Premium), sum({<PolicyRef = {'Pol B'}>} total Premium), sum({<PolicyRef = {'Pol C'}>} total Premium)), Carrier, PolicyRef))

Please find attached.

Hope this helps!

sudeepkm
Specialist III
Specialist III

Please find the attachment.

eduardo_sommer
Partner - Specialist
Partner - Specialist

Hi,

Use Carrier as the dimension and the following expression:

     =sum(aggr(sum(total<PolicyRef> Premium),Carrier,PolicyRef))

Eduardo