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!
I would appreciate if you could help me or give some any help.
Sales Amount RT Year =
VAR FirstVisibleDate = MIN ( 'Date'[Date] )
VAR LastVisibleDate = MAX ( 'Date'[Date] )
VAR LastDateWithSales = CALCULATE ( MAX ( 'Sales'[Order Date] ), REMOVEFILTERS () )
VAR Result =
IF (
FirstVisibleDate <= LastDateWithSales,
CALCULATE (
[Sales Amount],
'Date'[Date] <= LastVisibleDate,
VALUES ('Date'[Calendar Year] )))
RETURN
Result
But when i filter by month, the running total is not correct.
Thank you!
Solved! Go to Solution.
@Anonymous
pls try this
Measure =
VAR _min=CALCULATE(min('date'[Date]),ALLSELECTED('date'))
VAR _date=max('date'[Date])
VAR _min2=date(year(_date),month(_min),1)
return CALCULATE(SUM('Table'[value]),FILTER(all('Table'),'Table'[date]>=date(year(_date),month(_min),1)&&'Table'[date]<=_date))
pls see the attachment below
Proud to be a Super User!
@Anonymous
do you want to keep the RT value?
Measure =
VAR _date=max('date'[Date])
return CALCULATE(SUM('Table'[value]),FILTER(all('Table'),'Table'[date]>=date(year(_date),1,1)&&'Table'[date]<=_date))
pls see the attachment below
Proud to be a Super User!
Hi, @ryan_mayu
Thanks for the help! it gives me another ideas to solve other future situations, but didn't help me in that one.
it has to be similar to that one ( i know its kinda tricky but i want to solve this scenario just for fun 😉 )
@Anonymous
pls try this
Measure =
VAR _min=CALCULATE(min('date'[Date]),ALLSELECTED('date'))
VAR _date=max('date'[Date])
VAR _min2=date(year(_date),month(_min),1)
return CALCULATE(SUM('Table'[value]),FILTER(all('Table'),'Table'[date]>=date(year(_date),month(_min),1)&&'Table'[date]<=_date))
pls see the attachment below
Proud to be a Super User!
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 |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 121 | |
| 103 | |
| 47 | |
| 30 | |
| 24 |