Forum Discussion
Anonymous
4 years agoNot applicable
DAX
Hi Paul,
distinct count of sales =
CALCULATE (
distinctcount('fact'[order_id],
FILTER ( 'Dim Channel', [Exclude Dim Channel] >= 1 ),
FILTER ( 'Dim Item', [Exclude Dim Item] >= 1 ),
FILTER ( 'Dim REF', [Exclude Dim REF] >= 1 )
)
This measure is taking ages to load.
Could you please help me with this?
Anonymous
Can you try the following?.distinct count of sales = CALCULATE ( SUMX ( DISTINCT( 'fact'[order_id] ) , 1 ), FILTER ( 'Dim Channel', [Exclude Dim Channel] >= 1 ), FILTER ( 'Dim Item', [Exclude Dim Item] >= 1 ), FILTER ( 'Dim REF', [Exclude Dim REF] >= 1 ) )
4 Replies
- sarjensystems1Helper III
hi Bharat
Have you tried doing same using 'var' ?- AnonymousNot applicable
Hi sarjensystems1 Thanks for the reply- I tried that but it didn't help
- sarjensystems1Helper III
Then, instead of using measure use calculated columns by making flags (for conditions i.e. ">=1") , it might doesn't takes too much time to load calculation unlike measure.
- FowmySuper User
Anonymous
Can you try the following?.distinct count of sales = CALCULATE ( SUMX ( DISTINCT( 'fact'[order_id] ) , 1 ), FILTER ( 'Dim Channel', [Exclude Dim Channel] >= 1 ), FILTER ( 'Dim Item', [Exclude Dim Item] >= 1 ), FILTER ( 'Dim REF', [Exclude Dim REF] >= 1 ) )