Forum Discussion

fbittencourt's avatar
fbittencourt
Icon for Helper IV rankHelper IV
9 months ago
Solved

Report technical page to show code errors of charging tables

Hi all! I need to create Report technical page to show code errors of charging tables I found a code from co pilot , but it´s retrieving an error, if anyone has a better code I appreciate it.   I...
  • v-echaithra's avatar
    v-echaithra
    8 months ago

    Hi fbittencourt ,

    Keep this as a function query:

    let
    Attempt = try tbl,
    Output = if Attempt[HasError] then
    #table(
    {"Table", "Status", "Message"},
    {{TableName, "Error", Attempt[Error][Message]}}
    )
    else
    #table(
    {"Table", "Status", "Message"},
    {{TableName, "OK", ""}}
    )
    in
    Output

    Use this report query is used to produce a final table output that can be loaded into the model and shown in Report View.

    let
    Checks = {
    fxAuditTable(REF_DASCOOPS, "REF_DASCOOPS"),
    fxAuditTable(REF_FOURNISSEUR, "REF_FOURNISSEUR")
    },

    Combined = Table.Combine(Checks)

    in
    Combined

    Kindly share the sample data in a workable format (such as text, Excel, or a PBIX file with sample data) so we can proceed with testing and troubleshooting.

    Regards,
    Chaithra E.