Forum Discussion
Arturo24
2 years agoFrequent Visitor
Sum a column from a filtered table
How do I sum a column form a filtered table that returns the entire value of that filtered column? Example: If I filter the table below for the laSt two days: days 3 and 4, I want to return the ...
- 2 years ago
Hi,
Try these measures
Measure1 = sum(Data[Units])
Measure2 = calculate([Measure1],allselected(Data[Dept]))
Hope this helps.
- Anonymous2 years ago
Hi Arturo24 ,
First of all, many thanks to Ashish_Mathur for your very quick and effective replies.
Based on my testing, please try the following methods:
1.Create the simple table.
2.Create the new measure to filter the day and return every dept total.
Dept total = CALCULATE(SUM('Table'[Units]), FILTER('Table', 'Table'[Day] in {3,4}))3.Create the new measure to calculate all dept total.
Total = CALCULATE([Dept total], ALL('Table'[Dept]))4.Drag the measures into the table visual.
5.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LightSQR
2 years agoFrequent Visitor
Oh wait - just noticed the consolidation in the middle column... Give me a sec...