Hi Gurus,
I am trying to create a PQL KPI for a View that will sum a field called TRX_rev_amount. Its a negative number so I'm using the ABS function.
For some reason, it is working great when I have it in charts or as a KPI list at the header level (see attached screenshot), but it does not work when I have it in a table. TBH I have no idea how it is coming up with the amount of $3.14k. It should be the same as above ($524). The code I'm using for the KPI is:
SUM( FILTER_TO_NULL(ABS("ar_billing_transactions"."trx_rev_amount")))
If I change the code to a PU_SUM (see below) with a domain field to aggregate it by the trx_number it will work for the table, but then does not work in the header or in charts etc. What should I be doing differently?
PU_sum (
DOMAIN_TABLE ( "ar_billing_transactions"."trx_number" ) ,
( ABS ("ar_billing_transactions"."trx_rev_amount" )
))