Forum Discussion
MarshalSK
Resolver I
2 years agoNeed a assistance with DAX calculation
Hi Folks, Need your experties, for DAX formula to get Sum of sales based on Col2. I have provided Data, screen shot in Expected result (without filter and with Filter ) Sample Data: Month...
- Anonymous2 years ago
Hi MarshalSK ,
I suggest you to try code as below to create a measure.
Sum of Sales = CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[MonthYear] = MAX ( 'Table'[MonthYear] ) && 'Table'[Col1] = MAX ( 'Table'[Col1] ) && 'Table'[Col2] = MAX ( 'Table'[Col2] ) ) )Result is as below.
Without Filter
Filter -> Exclude ->Col4-Z1
Filter -> Exclude ->Col4-Y1,Col3-B4
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ahmedx
Super User
2 years agoBased on your description, I created data to reproduce your scenario. The pbix file is attached in the end.