Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
thomas682
New Member

Total sum get result grouped by other columns

Hello community,

 

i try to understand the calculation of a total sum.

 

I created a new measure to add all hours on days ("Ist-Aufwand"):

 
Total =
var x1 = CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALL(Stunden[Datum]); Stunden[Datum] <= MAX(Stunden[Datum])))
return
x1
 
the table looks like:
2020-10-13 15_23_53-Präsentation1 - PowerPoint.png
 
with this result:
2020-10-13 15_09_22-BI Auswertungen_v17 - Power BI Desktop.png
 
The total is not a total overall ??
Can i avoid that the total calculation depends from other columns or be grouped?
 
thanks for help
thomas 
 
1 ACCEPTED SOLUTION

I find a solution

 

I have changed the measure:

CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALL(Stunden[Datum]); Stunden[Datum] <= MAX(Stunden[Datum])))
to
CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALLSELECTED(Stunden); Stunden[Datum] <= MAX(Stunden[Datum])))
 
and now the total count over all!
 
2020-10-13 17_19_43-BI Auswertungen_v17 - Power BI Desktop.png
 
thanks for your suggestions,
thomas

View solution in original post

4 REPLIES 4
camargos88
Community Champion
Community Champion

Hi @thomas682 ,

 

Try this:

 

Total = CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALL(Stunden); Stunden[Datum] <= MAX(Stunden[Datum])))

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



thanks for your help, but I should to explain want I want:

 

I have a list of projects with hours working time for every day.

I then filter all projects that I want to evaluate with a BI Filterbox.

In this example You see only the projects with the number "088103" and "088102". 

(I often use an addional date filter to limit the analyzing)

 

As result the total counts each project separately (starts from 1) , but I want the total for all projects without grouped calculation!

e.g.

2020-10-13 16_25_42-BI_Gesamtstunden_2016.xlsm - Excel.png   

...the red column is what I want.

 

Hope I could explain it better understandable

 

thomas

I find a solution

 

I have changed the measure:

CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALL(Stunden[Datum]); Stunden[Datum] <= MAX(Stunden[Datum])))
to
CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALLSELECTED(Stunden); Stunden[Datum] <= MAX(Stunden[Datum])))
 
and now the total count over all!
 
2020-10-13 17_19_43-BI Auswertungen_v17 - Power BI Desktop.png
 
thanks for your suggestions,
thomas
amitchandak
Super User
Super User

@thomas682 , Try like

 

Total =
var x1 = CALCULATE(SUM(Stunden[Ist-Aufwand]);Filter(ALL(Stunden[ProjectNum]); Stunden[ProjectNum] <= MAX(Stunden[ProjectNum])))
return
x1

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.