Forum Discussion
zahrabajgiran
3 years agoRegular Visitor
using average and SUM
INVOICE STEP INVOICEDATE TASKENDTIME DAYSSPENT 22093C Process Invoice 2022-04-29 41:00.0 5 22093C Super Approval 2022-04-29 14:00.0 37 22093C GL Stamp Job/Subcontractor 2022...
- 3 years ago
Hi zahrabajgiran,
If the columns on the screenshot above match your expectations, you can achieve such results using two similar calculated columns:
SUM_DAYSSPENT = VAR CurrentInvoice = [INVOICE] RETURN SUMX ( FILTER ( ALL(data), [INVOICE] = CurrentInvoice ), [DAYSSPENT] ) AVG_DAYSSPENT = VAR CurrentInvoice = [INVOICE] RETURN AVERAGEX ( FILTER ( ALL(data), [INVOICE] = CurrentInvoice ), [DAYSSPENT] )Best Regards,
Alexander
barritown
3 years agoSolution Sage
Hi zahrabajgiran,
If the columns on the screenshot above match your expectations, you can achieve such results using two similar calculated columns:
SUM_DAYSSPENT =
VAR CurrentInvoice = [INVOICE]
RETURN SUMX ( FILTER ( ALL(data), [INVOICE] = CurrentInvoice ), [DAYSSPENT] )
AVG_DAYSSPENT =
VAR CurrentInvoice = [INVOICE]
RETURN AVERAGEX ( FILTER ( ALL(data), [INVOICE] = CurrentInvoice ), [DAYSSPENT] )Best Regards,
Alexander