Forum Discussion
zhejun728
1 year agoNew Member
Sum based on Active Filters
I'm a user of Tableau but a totally new user of Power BI. Im trying to create a new column to show the sum of COST which can be affected by active filters on visual. I have a sample data as below...
- Anonymous1 year ago
Hi zhejun728 ,
I create a table as you mentioned. Also I created a Slicer.
As tamerj1 said, you can create a measure and here is the DAX code.
Total Cost = CALCULATE ( SUM ( 'Table'[COST] ), ALLSELECTED ( 'Table' ) )Finally you can get what you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.