Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello there,
I want to Count date rows, if the month and the year in the row are the same.
Is there a way to do this in DAX?
Beste regards
MSOMME
Solved! Go to Solution.
Hi,
MyMeasure =
SUMX (
'TABLE A',
0
+ ( EOMONTH ( 'TABLE A'[Created], 0 ) = EOMONTH ( 'TABLE A'[finished], 0 ) )
)Regards
Hi,
MyMeasure =
SUMX (
'TABLE A',
0
+ ( EOMONTH ( 'TABLE A'[Created], 0 ) = EOMONTH ( 'TABLE A'[finished], 0 ) )
)Regards
Thanks @Jos_Woolley ,
This seems to work so far, but unfortunatly this measures also counts the rows where The [Created] date and the [finished] date are empty. Is there a way to only count the rows, if they both have a value?
Best regards
MSOMME
Ok, then use this:
MyMeasure =
SUMX (
'TABLE A',
( EOMONTH ( 'TABLE A'[Created], 0 ) = EOMONTH ( 'TABLE A'[finished], 0 ) )
* ( 1 - ISBLANK ( 'TABLE A'[Created] ) )
)Regards
@Anonymous , I am assuming you need a new column
New column =
var _eo = eomonth([Date], 0)
return
countx(filter(Table, eomonth([Date], 0) =_eo), [date])
I really wasn't specific on this one. I have two dates in my table. A "created" date and a "finished" date.
I want to count those Rows, where both dates have the same Month and Year, so the EOMONTH function sure comes in handy here.
I imagined something like this: COUNTROWS(TABLE A, IF(EOMONTH([Created],0)=EOMONTH([finished],0))
But I already know it isn't gonna work like that.
All help is very appreciated! @amitchandak
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |