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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Good morning, I need to make a daily sales sum graph of the current month compared to the previous year, but I need you to only show me until the current day of the current month and not repeat the value of the sum until the last day.
This is the code I use.
Hi @Anonymous ,
Try to use the following measure:
Cumulative 2022 =
CALCULATE (
[TOTAL my 2022],
FILTER (
ALLSELECTED ( '412 - DIARIES' ),
'412 - DIA'[DIA] <= MIN ( TODAY (), MAX ( '412 - DIA'[DIA] ) )
)
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks for the reply, it appears the same way using that code.
Hi @Anonymous ,
You want the value to be blank when is higher than today is that it?
Try the following code:
Cumulative 2022 =
IF (
SELECTEDVALUE ( '412 - DIA'[DIA] ) <= TODAY (),
CALCULATE (
[TOTAL my 2022],
FILTER (
ALLSELECTED ( '412 - DIARIES' ),
'412 - DIA'[DIA] <= MAX ( '412 - DIA'[DIA] )
)
)
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsShare feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 46 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 88 | |
| 76 | |
| 41 | |
| 26 | |
| 26 |