Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
HereWeGoAgain
Contributor III
Contributor III

If Match function + a measure formula

Good Day

 

I would like to link the below two calculations into one formula to be used my in measure(for my line graph):

calc 1: =if(match(ContractName,'X110 - PPC SLURRY','X120 - PPC DWAALBOOM','X260 - DISTELL GP','X260 - DISTELL GP MANAGED','X270 - DISTELL CAPE TOWN','X270 - DISTELL CAPE TOWN MAANGED','CCL McCain Transport','X360 - ISANTI','X370 - EVERITE','X380 - MERENSKY','X390 - SAFRIPOL','X400 - CAPE TOWN LOCAL','X410 - LANGENI','X500 - OWNER DRIVERS','X500 - RELIEF DRIVERS','X510 - Refrigerated O/D (Trucks)','X575 - FIXED SUBCONTRACTORS','X600 - NEOGISTIX','X740 - NEOGISTIX NAMIBIA','X745 - NEOGISTIX SAFRIPOL','X999 - DEPOT SUPPORT','HVL' ),ContractName)

Calc 2: sum(TripFuel)/sum(TripDistance)*100

Hope this makes sense

Kind Regards

 

Labels (4)
1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

Is not really clear what you want to do, could it be you want to include just those ContractName in the sum, if so then include as set analysis;

sum({<ContractName={'your list'}>}TripFuel)/sum({<ContractName={'your list'}>}TripDistance)*100

Maybe?

Cheers,

Chris.

View solution in original post

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Is not really clear what you want to do, could it be you want to include just those ContractName in the sum, if so then include as set analysis;

sum({<ContractName={'your list'}>}TripFuel)/sum({<ContractName={'your list'}>}TripDistance)*100

Maybe?

Cheers,

Chris.

HereWeGoAgain
Contributor III
Contributor III
Author

@chrismarlow HI,

This is perfect, Thank you!

Kind Regards