Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
magellan
Contributor III
Contributor III

Use same expressions for different data origins (fields)

Hello,

I have several expressions which calculate KPIs, but have more than one data origins containing columns.
Let's say in this example its SH: TicketVolume and ST: TicketVolume

Now the expressions work when I directly use the fields of the origins like this:


sum(aggr(count(if([SH: Ticket Volume (Created)] > 1 AND AE <> isnull,[SH: Ticket Volume (Created)])),[SH: Ticket Volume (Created)]))

What I'm trying to achieve is that this expression can be used with ST:TicketVolume as well. So that I don't have to create the same expression for each data origin. I tried it with variables but it seems that these won't be recognized as the field after passing them through.

What would be the best way to achieve this?

Labels (2)
1 Solution

Accepted Solutions
steeefan
Luminary
Luminary

Modify your expression like this:

sum(aggr(count(if([S$(vHT): Ticket Volume (Created)] > 1 AND AE <> isnull,[S$(vHT): Ticket Volume (Created)])),[S$(vHT): Ticket Volume (Created)]))

Create the variable vHT and define it as either 'H' or 'T'. This should give you the desired results.

View solution in original post

2 Replies
steeefan
Luminary
Luminary

Modify your expression like this:

sum(aggr(count(if([S$(vHT): Ticket Volume (Created)] > 1 AND AE <> isnull,[S$(vHT): Ticket Volume (Created)])),[S$(vHT): Ticket Volume (Created)]))

Create the variable vHT and define it as either 'H' or 'T'. This should give you the desired results.

magellan
Contributor III
Contributor III
Author

Thank you very much. This worked!