Help creating a filter

Good afternoon everyone, I’m implementing a new dashboard at my work and I have a question and I wanted to know if anyone could help me.
Below I have the panel, with the index and filters (Origin System Acronym, Previous base date, Current base date and Product Family Code) the question is as follows we want to improve by removing these filters (Origin System Acronym and Product Family Code and creating a new filter with product name and when selecting the product it already links the origin acronym information and also the family code. this way the index and filters would be dispensed, leaving only the new Products and Dates filter so that the user can make their product comparisons between the two selected dates.
However, within the database we do not have the product field, only the Origin System Acronym, dates and product family code.
I would like to know if I can somehow create this filter.

thanks in advance

Hi @Theodoro_Fogagnoli
How do/can you create the product name without the field within your data? Can how combine other fields to get a product name?
BR

1 Like

I have the Origin System Acronym and Product Family Code, exemplo I know that all Origin System Acronym called SF3 and F5 combined with Product Family Codes 4 it is a Product from Giro Pré SF.

I’m thinking in a calculated field

ifelse({Origin System Acronym} = SF3 OR {Origin System Acronym} = F5 AND {${Product Family Code}} = 4, ‘Product Name’, NULL)

Origin System Acronym is a string fiel and Family code is a parameter

1 Like

Hi @Theodoro_Fogagnoli,

Could you create a calculated field using Origin System Acronym and Product Family Code fields in this formula?
concat({Origin System Acronym}, " ", toString({Product Family Code}))

Then add a filter for that calculated field?

Let me know if this meets your requirement and mark my reply as solution if so.

Many Thanks,
Andrew

I think I understand the problem, I need to create a calculated field with two parameters used in my query, but every time I try it says that there is a syntax error.

ifelse(
${SIGLASISTEMA} = ‘SF3’ AND ${CODIGOFAMILIA} = 4, ‘Giro Pré SF SF3’,
${SIGLASISTEMA} = ‘F5’ AND ${CODIGOFAMILIA} = 4, ‘Giro Pré SF F5’,
${SIGLASISTEMA} = ‘SF2’ AND ${CODIGOFAMILIA} = 8, ‘Crediário SF SF2’,
${SIGLASISTEMA} = ‘F5’ AND ${CODIGOFAMILIA} = 8, ‘Crediário SF F5’,
${SIGLASISTEMA} = ‘SF5’ AND ${CODIGOFAMILIA} = 9, ‘Consignado SF SF5’,
${SIGLASISTEMA} = ‘F5’ AND ${CODIGOFAMILIA} = 9, ‘Consignado SF F5’,
${SIGLASISTEMA} = ‘SF4’ AND ${CODIGOFAMILIA} = 133, ‘Desconto Antecipaçoes SF4’,
${SIGLASISTEMA} = ‘B6’ AND ${CODIGOFAMILIA} = 133, ‘Desconto Antecipaçoes B6’,
${SIGLASISTEMA} = ‘F5’ AND ${CODIGOFAMILIA} = 51, ‘Autobank F5’,
${SIGLASISTEMA} = ‘F5’ AND ${CODIGOFAMILIA} = 132, ‘Cessão F5’,
${SIGLASISTEMA} = ‘B6’ AND ${CODIGOFAMILIA} = 134, ‘Vendor B6’,‘CDC F5’)

I took a look at the documentation, but to be honest I still don’t understand exactly how to use the parameters in the calculated field.

These are my parameters used in the query

image

Hi @Theodoro_Fogagnoli
why do you want to use parameter instead of using the @abacon approch?
concat({Producto}, " ", toString({Sigla Sistema Origem}))as a new field?

What datatyp is the ${CODIGOFAMILIA}? Looks to me like a String.

BR

Hello @Theodoro_Fogagnoli , @ErikG , and @abacon !

@Theodoro_Fogagnoli were you able to find a solution to this problem or are you still working through this? Were you able to try @ErikG 's suggestion above?