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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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:
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
19 | |
15 | |
7 | |
6 |