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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Reference current row in a measure

Dear community,

 

I am more and more getting desparate with the following issue and therefore now turning to you. Until recently I was an Excel power user, but now turned towards PowerBi, which I am mostly very happy about.

 

The issue at hand is that I want to create a measure that uses the current row value as a reference. More specifically, I want to create a sum across a column for all rows which have a reference value (other column) >= the current row. I found out that this can be done in a "New Column" relatively easily. However, I need a measure as it should be processed further and must be adaptive to filtering in the report.

I attached an examplary table and a screenshot of how I would create that funtionality in Excel (in case it helps).Excel reference.PNG

ReferenceValues to sum upCumulative Sum
13.23051610712.24387441
10.88076764612.24387441
10.94091648612.24387441
10.30959866312.24387441
10.13756572212.24387441
20.9208494346.744509782
30.2929054475.823660349
30.2934943065.823660349
30.6191710525.823660349
30.4471428395.823660349
30.0354135095.823660349
30.026734835.823660349
40.5140890924.108798367
40.2978662414.108798367
40.6560811614.108798367
40.1638964064.108798367
50.5643059932.476865465
50.7964321832.476865465
60.2535677421.11612729
60.8625595481.11612729

 

Thanks so much in advance!

Steffen

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , try a new measure like

calculate(sum(Table[Values to sum]), filter(allselected(Table), Table[Values to sum] >=max(table[Values to sum])))

 

or new column like

sumx(filter(Table,Table[Values to sum] >=earlier(table[Values to sum])),[Values to sum])

 

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@amitchandak Thanks a lot!
The "measure"-version is what I was looking for. I replaced the columns within the filter bracket to the "Reference" column and that produces the desired result.

 

It still feels odd having to use the max() operator just to reference the current row, though. 

amitchandak
Super User
Super User

@Anonymous , try a new measure like

calculate(sum(Table[Values to sum]), filter(allselected(Table), Table[Values to sum] >=max(table[Values to sum])))

 

or new column like

sumx(filter(Table,Table[Values to sum] >=earlier(table[Values to sum])),[Values to sum])

 

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.