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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Problem with comulative sum

Hello,

I am trying to make a comulative count based on the Response time (hrs). As you can see, the "Bins column" are hours (ex. 0-4 hrs). I also created an index for the bins and the count of response time is the count of the hours that fall within the Bins column. I tried all possible formula but I cant seem to get a comulative count. I am very new at PBI and I will appreciate any help that I can get. Thanks!

 

evora01_0-1679560941285.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated table.

vyangliumsft_0-1679970495682.png

 

Table 2 =
var _tabel1=SUMMARIZE('Table',
'Table'[Bin_No],'Table'[Bins],
"count of ResponseTime_BDNotified(hours)",
COUNTX(
    FILTER(ALL('Table'),'Table'[Bins]=EARLIER('Table'[Bins])),[ResponseTime_BDNotified(hours)])
)
var _table2=
ADDCOLUMNS(
    _tabel1,"Sum",
    SUMX(
        FILTER(_tabel1,[Bin_No]<=EARLIER('Table'[Bin_No])),[count of ResponseTime_BDNotified(hours)]))
return
    _table2

 

vyangliumsft_1-1679970495683.png

2. Create measure.

 

Flag=
SUMX(
    FILTER(
       'Table 2',[Bins] = MAX('Table'[Bins])),[Sum])

 

 

3. Result:

vyangliumsft_0-1679970557499.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated table.

vyangliumsft_0-1679970495682.png

 

Table 2 =
var _tabel1=SUMMARIZE('Table',
'Table'[Bin_No],'Table'[Bins],
"count of ResponseTime_BDNotified(hours)",
COUNTX(
    FILTER(ALL('Table'),'Table'[Bins]=EARLIER('Table'[Bins])),[ResponseTime_BDNotified(hours)])
)
var _table2=
ADDCOLUMNS(
    _tabel1,"Sum",
    SUMX(
        FILTER(_tabel1,[Bin_No]<=EARLIER('Table'[Bin_No])),[count of ResponseTime_BDNotified(hours)]))
return
    _table2

 

vyangliumsft_1-1679970495683.png

2. Create measure.

 

Flag=
SUMX(
    FILTER(
       'Table 2',[Bins] = MAX('Table'[Bins])),[Sum])

 

 

3. Result:

vyangliumsft_0-1679970557499.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

rajulshah
Resident Rockstar
Resident Rockstar

@Anonymous 

Can you please provide the sample data?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.