Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
brunopaulo
Partner - Creator II
Partner - Creator II

SubStringCount Advanced

Hi community,

I can't solve this problem and would be great if you could help me.

At the moment i have 4 tables each one has Dim1, Dim2, Metric1.
The values on this fields change based on Dim3. If dim3 has no selection, then show nothing. If Dim3 has 1 selected i want to show the results for that selection, if 2 values of dim3 are selected then show me the correct values. And the perfection is if dim3 has 2 value selected i could represent all in metric1 column.

Any help would be great. Thank you in advance

Best Regards

Bruno Paulo

2 Replies
MarcoWedel

please post some sample data and your expected result

Anil_Babu_Samineni

This is my assumption?

If(GetSelectedCount(Dim3)=0, '',

If(GetSelectedCount(Dim3)=1, Sum(Metric1),

If(GetSelectedCount(Dim3)>2, Sum({<Dim3=P(Dim3)>} Metric1),

If(GetSelectedCount(Dim3)=2, Sum({<Dim3=>} Metric1)))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful