Hello. I would like to change the display of an at...
# gooddata-platform
t
Hello. I would like to change the display of an attibute value in a table insight. Currently it displays: "payment_succeeded". I would like to change it to "debit successful". For that I created the metric financial_status :
Copy code
SELECT 
	CASE 
    	WHEN financial_status = "payment_succeeded" THEN "debit successful",
        WHEN financial_status = "refund_succeeded" THEN "refund successful",
        WHEN financial_status = "payment_failed" THEN "debit failed",
        WHEN financial_status = "refund_failed" THEN "refund failed"
        ELSE ""
    END
financial_status
in the MAQL definition is an attribute in the dataset financial_transactions. When I try to replace the attribute
financial_status
with the metric
financial_status
in my table, I cannot find it, probably because Gooddata think it's not a relevant metric for my table. How can I solve that ?
i
Hi Thibault, Please be aware that CASE function was mainly designed to return numeric results, not the strings. Does your metric works correctly if placed in your insight separately with Financial Status attribute?
t
If I use Financial status attribute, it displays the value that I have in db (payment_succeeded, refund_succeeded, ...), but it is not friendly for the client. Also I notice the values displayed are kind of grouped but not sure how and it gives weird result. I want to do something quite simple. I have in my db (redshift) a table looking like the first attached image. I want my client to see exactly the same in gooddata. But right now I have few issue : •
id utilisateur
has empty value because somehow something is grouped. • I cannot see time in my date (I need to display time like in the db) • financial_status needs to display an empty string when NULL (instead of (empty value)
I give you a specific example where data is totally different. In the screenshot this is what I have in GoodData. But for the Contrat with id 1420899, I should have: • Contrat: 1420899 • Date d'emprunt: 2025-02-03T101930 • Date de retour : NULL • Date d'expiration : 2025-02-18T101930 • financial_status and Erreur are both NULL in the db as in gooddata
i
Hi @Thibault Gouala - CTO Bibak, You can actually add a secondary, more human friendly, label to the existing attribute. I am not sure about the grouping here, empty values usually mean there is no data/value uploaded. Dates need to be uploaded under the specific data set and data type, more details can be found here . Would it be possible to share with me the URL to affected workspace, please? I'd like to check what might be causing the issue here. Please feel free to share it via DM.