Forum Discussion
AlexOakman
3 years agoFrequent Visitor
SUMMARAZE performance / early materialization
Hi, I have a large fact table. I need to calculate a tricky measure. The first step I need to group this table by a certain set of attributes, excluding repetitions, and then find the sum over the re...
tamerj1
Community Champion
3 years agoYou may also try
TEST_v1 =
SUMX (
VALUES ( 'Dim date'[firstdate_of_month_key] ),
VAR _min = 'Dim date'[firstdate_of_month_key]
VAR _max =
CALCULATE ( MAX ( 'Dim date'[date_key] ) )
VAR _tbl1 =
FILTER (
CALCULATETABLE ( 'Test_balance', ALL ( 'Test_balance' ) ),
'Test_balance'[date_key] >= _min
&& 'Test_balance'[date_key] <= _max
)
VAR _tbl2 =
SUMMARIZE (
_tbl1,
'bridge_dpd_addition'[dpd_group_company],
'Test_balance'[prolongation_num_cumulative],
'Test_balance'[amount_usd],
'Test_balance'[credit_key]
)
VAR _res =
SUMX ( _tbl2, [amount_usd] )
RETURN
_res
)
- AlexOakman3 years agoFrequent Visitor
Thanks for the advice. Unfortunately the result is the same as for ADDCOLUMN(SUMMARAZE(...)) =(