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: 
varunreddy
Creator III
Creator III

Expressions based on the values

Hi All,

I have two fields, CDE and DQ Metrics Process ID. Each CDE is associated to multiple Process ID's.

If the CDE is associated to Process ID that starts with 3 (i.e. 30000 or 30101), then I need one expression (i.e. sum(Process ID),

else Count(Process ID).

My dimension is CDE.

Can anyone please help me with the solution?

Thanks for your help in advance!

Cheers,

Varun

4 Replies
hector_munoz
Specialist
Specialist

Hi Varun,

If I have not understood you bad, you need to sum only when Process ID starts with "3"; else count Process ID... Would it serve this?

Sum(If(Left([Process ID], 1) = 3, [Process ID], 1))

Sure I am missing something in your explanations...

Regards,
H

varunreddy
Creator III
Creator III
Author

Hi Hector,

Thanks for quick response.

CDE   Process ID

ABC     2000

DEF     3000

XYZ     3101

Here one CDE has two Process ID's.

I am trying to write expressions based on Process ID's.

If Process ID, starts with '3*' (i.e.3000 or 3101), then I want to write an expression sum(Process ID), else count(Process ID).

I also want to see sum(Process ID), when I select CDE (i.e. DEF or XYZ).

Please let me know, if you still have issues understanding this.

Thanks,

Varun

vishsaggi
Champion III
Champion III

Try this?

Dim:

CDE

Expr:

= IF([Process ID] >= 3000, Sum(TOTAL Aggr(Sum({< [Process ID] = {">=3000"} >}[Process ID]), [Process ID])), Count([Process ID]))

el_aprendiz111
Specialist
Specialist

Hi,

PROCES.gif