Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match Function with array of values

Trying to use the Match Function against an array of values. I have an array of time values in Field "HourArray". Next I wrote a calculated dimension using the Match Function. and named it "Working Y/N" in the pivot table. My intent is for the Match Function to find the match for the single digit hour in field "HourOfDay" in the array stored in field "HourArray" , and have the result returned as Working or Not Working in field "Working Y/N". The match always returns 0. I have tried removing the single quotes in the array to no avail. If anyone has some insight to this, it would be greatly appreciated.

Thanks All.

Array.tif

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

HelpWithArrays.PNG.pngSo i don't understand the format of the array, but if the array is actually just a field from the data model, a common way to do the same thing is with the CONCAT and substringcount function. Does this help ?

View solution in original post

5 Replies
Mattias_Malré
Employee
Employee

Hi Sheldon

Please post your questions so people can read them properly.

Thanks in advance

-Matt

I accept cookies.
Not applicable
Author

Trying to use the Match Function against an array of values. I have an array of time values in Field "HourArray". Next I wrote a calculated dimension using the Match Function. and named it "Working Y/N" in the pivot table. My intent is for the Match Function to find the match for the single digit hour in field "HourOfDay" in the array stored in field "HourArray" , and have the result returned as Working or Not Working in field "Working Y/N". The match always returns 0. I have tried removing the single quotes in the array to no avail. If anyone has some insight to this, it would be greatly appreciated. Thanks All.

Array.tif

Mattias_Malré
Employee
Employee

Thanks! I updated the first post for you

I accept cookies.
JonnyPoole
Employee
Employee

HelpWithArrays.PNG.pngSo i don't understand the format of the array, but if the array is actually just a field from the data model, a common way to do the same thing is with the CONCAT and substringcount function. Does this help ?

Not applicable
Author

The SubString Count Function was exactly what was  needed! Thanks Jonathan!