Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a error table with a column , called "descriptions" where you can write inside practically everything:
Date | Report | Description | Valid from | Valid until |
09.06.2020 | 11111111 | (9999)5555 | 01.01.2020 | 31.12.2999 |
09.06.2020 | 11111111 | Table | 08.06.2020 | 31.12.2999 |
09.06.2020 | 11111111 | stock | 01.01.2020 | 31.12.2999 |
09.06.2020 | 11111111 | (9999)1234 | 08.06.2020 | 31.12.2999 |
I only want these values returned which looks like (9999)####.
How to write that expression?
Thanks in advance.
Best.
I don't think there's a single-line way to do it as you would with a regular expression, but pairing two function sets should do it:
WildMatch(Description,'(9999)????') AND IsNum(Right(Description,4))
Hi,
Good Day😊
As per your requirement you need an field with the values like format (9999)#### and exclude the string values.
So you can use the substringcount either in script or chart.
In script create the additional field and use it in the front end
i have included the example code,
Table1:
Load * Inline [
KPI,Target,Budget,Quarter,Description
Sales KPI,80,75,Q1,(9999)5555
Sales KPI,80,78,Q2,Table
Sales KPI,72,85,Q3,Stock
Sales KPI,78,80,Q4,(9999)1234
];
Table2:
load
Description,
if(SubStringCount(Description,'(9999)'),Description) as Description1
Resident Table1;
the field with string values could be neglected and number with the correct format only printed.
after checking the suppress when value is null for description dimension it gives the below output,
Meanwhile, it is performed in the front end by creating the calculated dimension
=if(Substringcount(Discription,'(9999)'),Discription,'')
Hope it is helpful
Regards,
DurgadeviKumar
Hi, try with :
=if(wildmatch(Description,'*(9999)*'), Description)
I don't think there's a single-line way to do it as you would with a regular expression, but pairing two function sets should do it:
WildMatch(Description,'(9999)????') AND IsNum(Right(Description,4))
Can you write me a set analysis kind of function?
also as set analysis expressed possible?
Hi,
Good Day😊
As per your requirement you need an field with the values like format (9999)#### and exclude the string values.
So you can use the substringcount either in script or chart.
In script create the additional field and use it in the front end
i have included the example code,
Table1:
Load * Inline [
KPI,Target,Budget,Quarter,Description
Sales KPI,80,75,Q1,(9999)5555
Sales KPI,80,78,Q2,Table
Sales KPI,72,85,Q3,Stock
Sales KPI,78,80,Q4,(9999)1234
];
Table2:
load
Description,
if(SubStringCount(Description,'(9999)'),Description) as Description1
Resident Table1;
the field with string values could be neglected and number with the correct format only printed.
after checking the suppress when value is null for description dimension it gives the below output,
Meanwhile, it is performed in the front end by creating the calculated dimension
=if(Substringcount(Discription,'(9999)'),Discription,'')
Hope it is helpful
Regards,
DurgadeviKumar
Hello @Durgadevikumar ,
thank you very much!