Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am trying to get the Running total based on ServiceID But getting an error. Below is my table data . I
Group Service ID Amount
A 1 $2
A 4 $1
A 2 $3
B 2 $1
B 6 $4
When i try to create Rank based on the below dax getting an error "A single value for column ' Service ID ' in table 'Sampledata' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result"
Rank = RANKX(SampleData,SampleData[Service ID],,ASC,Dense)
for the Running total i am using below dax , But the Earlier function does not recognise the any column from the table.
RunningTotal =
CALCULATE (
SUM ( SampleData[Amount] ),
ALLEXCEPT ( SampleData, SampleData[Group] ),
SampleData[Rank] <= EARLIER ( SampleData[Rank] )
)
Please help me know , what went wriong here. ?
TIA
Midhun
why you want to create rank column?
is this what you want?
running total = sumx(FILTER('Table','Table'[Group]=EARLIER('Table'[Group])&&'Table'[Service ID]<=EARLIER('Table'[Service ID])),'Table'[Amount])
Proud to be a Super User!
Hi @ryan_mayu ,
I have tried this DAX as well. but Earlier function does not getting any columns its giving an error as Earlier row context which does not exist .
running total = sumx(FILTER(Sampledata,Sampledata[Group]=EARLIER(group)&&Sampledata[ Service ID ]<=EARLIER(Service)),Sampledata[Amount])
pls try this
running total = sumx(FILTER(Sampledata,Sampledata[Group]=EARLIER(Sampledata[Group])&&Sampledata[ Service ID ]<=EARLIER(Sampledata[ Service ID ])),Sampledata[Amount])
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 172 | |
| 107 | |
| 92 | |
| 54 | |
| 46 |