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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to get the distinctcount of id's where the date = last day of the month or current day. The formula looks like this.
Calculate(DISTINCTCOUNT(TABLE[ID],FILTER(TABLE,TABLE[DATE] IN {VALUES(DATE_TBL[LAST_DAY_OF_MONTH])} || TABLE[DATE] = MAX(TABLE[DATE])
I get the expected results when it's just Last day of Month. When I include || Max(Table[Date}) I don't get the results that I want.
Solved! Go to Solution.
Hi @BIBRO ,
Based on your description, I have created a simple sample;
Please try:
Measure = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Date]=MAX('Table'[Date])||[Date]=EOMONTH([Date],0)))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @BIBRO ,
Based on your description, I have created a simple sample;
Please try:
Measure = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Date]=MAX('Table'[Date])||[Date]=EOMONTH([Date],0)))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 18 | |
| 12 |