Forum Discussion
mizaskun
Helper II
5 years agoModify measures depending on filters
Good morning, I have a very simple model: User Type Amount A Z 100 A Z 200 A Y 50 I created the following measure: TotalByUser = calculate( sum(Table[Amount]), all...
- 5 years ago
TotalByUser = CALCULATE( SUM( Table[Amount] ), VALUES( Table[User] ), ALLSELECTED( 'Table' ) )It might be that the above does what you want...
amitchandak
Super User
5 years agomizaskun , Try a measure like
sumx(values(Table[User]) ,if(isfiltered(Table[Type]) , calculate(sum(Table[Amount])), calculate( sum(Table[Amount]), allexcept(Table, Table[User]))))
- mizaskun5 years ago
Helper II
Good morning,
Thank you for your answer! The model actually have much more fields through which can be filtered. The table I explained was a simplification to make it easier to understand what I need. There should be a way to achieve that behavour.
Thank you so much!
- daxer-almighty5 years ago
Solution Sage
TotalByUser = CALCULATE( SUM( Table[Amount] ), VALUES( Table[User] ), ALLSELECTED( 'Table' ) )It might be that the above does what you want...