Forum Discussion
vkisa
Helper II
2 years agoMeasure for Monthly Sum with Filter
Hi, I need some help to get measure that calculates the total deposit for specific customers that had accomplished sales both product A and B (green cells). I don't want to create a new calculated ...
- Anonymous2 years ago
Hi vkisa ,
Regarding your question, Is it because the sales volume is 0 that excludes the calculation of '1001'?
Try this.
MEASURE = VAR _table = ADDCOLUMNS ( SUMMARIZE ( 'Table1', [Customerid], "SalesA", SUM ( Table1[SalesAmountA] ), "SalesB", SUM ( Table1[SalesAmountB] ), "Deposit", SUM ( Table1[Deposit] ) ), "isAccomplish", IF ( [SalesA] <> 0 && [SalesB] <> 0, TRUE (), FALSE () ) ) RETURN SUMX ( FILTER ( _table, [isAccomplish] = TRUE () ), [Deposit] )Best Regards,
Wenbin Zhou
Anonymous
2 years agoNot applicable
Hi vkisa ,
Regarding your question, Is it because the sales volume is 0 that excludes the calculation of '1001'?
Try this.
MEASURE =
VAR _table =
ADDCOLUMNS (
SUMMARIZE (
'Table1',
[Customerid],
"SalesA", SUM ( Table1[SalesAmountA] ),
"SalesB", SUM ( Table1[SalesAmountB] ),
"Deposit", SUM ( Table1[Deposit] )
),
"isAccomplish",
IF ( [SalesA] <> 0 && [SalesB] <> 0, TRUE (), FALSE () )
)
RETURN
SUMX ( FILTER ( _table, [isAccomplish] = TRUE () ), [Deposit] )
Best Regards,
Wenbin Zhou