Forum Discussion
sum measure from different cards
- 1 year ago
Hi DECRE83
Welcome to the Microsoft Fabric Forum,Regarding the measure to sum only the selected steps for the transportation route:
Since all step costs are stored in a single table, and the requirement is for the total to reflect only the steps selected through the slicers, a measure should be created that dynamically respects the current filter context.
Use SUMX function :
DAX:Total Selected Route Cost = SUMX( VALUES(Table[StepID]), CALCULATE(SUM(Table[StepCost])) )
If steps are uniquely identified by multiple columns (category, location1,location2) adjust the measure:
DAX:Total Selected Route Cost = SUMX( SUMMARIZE( Table, Table[Category], Table[Location1], Table[Location2] ), CALCULATE(SUM(Table[StepCost])) )If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.
Thank you for being part of the Microsoft Fabric Community.
Hi DECRE83
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.