Dear All,
hence, reaching out to you .. please help ..
Hi Ramu,
This is Daniel from Stiltsoft team, the creators of Table Filter, Charts & Spreadsheets for Confluence.
This is a somewhat complex use case for the Table Transformer, so the solution may not be as straightforward as desired.
One approach is to use two Table Transformers. Please refer to the screenshot below (taken in Cloud, but the setup is identical in the Data Center version):
In Section A, I used the following query (based on an example from our documentation):
SEARCH / AS @a EX(SPLIT_VIEW('Labels', ",")) / RETURN(@a->'Key' AS 'Key', _ AS 'Label') FROM T1
This splits the Labels column into individual values to make counting occurrences easier.
In Section B, I used the following:
SELECT T1.'Key', TD2.'Testing Label Amount' FROM T1LEFT JOIN(SELECT 'Key', Count('Label') AS 'Testing Label Amount' FROM T2 WHERE 'Label' LIKE "Testing%" GROUP BY 'Key') AS TD2ON T1.'Key' = TD2.'Key'WHERE TD2.'Testing Label Amount' > 1;
This counts the number of Testing category labels for each Key, then joins that result with the main table. The final filter retains only entries with more than one Testing label.
Let me know if this solution works for you.
Daniel
Hi
Hi Daniel,
Thank you for the response ..
Cheers ...
Hello Ramu,
I found out that it is possible to utilize the MATCH_REGEXP function to count the number of labels.
You can use the following SQL query:
SELECT * FROM T1 WHERE MATCH_REGEXP('Labels', "Testing", "g") -> length > 1;
Let me know if this works for you.
Thanks again ..
It looks like you're new here. Sign in or register to get started.