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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello everyone, I'm just starting with Power BI and Power Query and I'm trying to do a new measure like a SUMIF in Excel.
I tried to use Group By, but didn't work like I need.
I have rows with date and price, and I need to sum every line with date before the actual month. In excel I was using one Pivot Table, filtering every month except the current one. But i don't know the best way to do it here with BI.
Can anyone help me with a solution?
Thanks in advance 🙂
@Anonymous
If I am Correct the second chart in the below screen snap is your desired outcome Right?
I'll print an exemple to explain what i'm trying to do:
I want to sum all "total values" if date is less than the current
It should return an chart like this:
In excel I used the function: =SUMIF([date];"<="&[@date];[total])
But I'm looking an way to do it inside Power Query
Ohh you want a running total. In this case, you need to create a calculated column.
Running total = calculate(sum(total),filter(table,earlier(date)>=date))
Try this formula in your context. This might be working. If not comment and I will look into it.
I'm sorry, I think I'm doing something wrong.. it didn't work.
Returned this error when I tried to create the calculated column. I just switched the names in the formula by the names of my columns.
Hi @Anonymous,
I believe the result should be in a table visual right?
If yes please reply I have a solution.
I'm trying to create a line chart with these data. Is it what are you asking?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 52 | |
| 45 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 113 | |
| 50 | |
| 37 | |
| 30 |