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
Hi all,
I wrote a DAX to display data up till the selected month like this :
Solved! Go to Solution.
hi @Velvetine27
try like:
Hi @Velvetine27 ,
I created some data:
Table:
Date:
Here are the steps you can follow:
1. Create measure.
Flag =
var _selectyear=SELECTEDVALUE('Date'[Year])
var _selectmonth=MAXX(ALLSELECTED('Date'),[Month])
var _start=DATE(_selectyear,1,1)
var _end=EOMONTH(DATE(_selectyear,_selectmonth,1),0)
return
IF(
MAX('Table'[date]) >=_start && MAX('Table'[date])<=_end,1,0)Measure =
SUMX(ALLSELECTED('Table'),[DO/SO])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
hi @Velvetine27
try like:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 21 | |
| 17 | |
| 11 | |
| 10 |