Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Countrows only for the values that have a minor date than today

Hi I am trying to create a measure that ONLY will count the rows of the values in column "Date" that are minor than today. That means everything < Today. But the ones that I have created count everything, I don't know where the error is. I am going to display it by costumer.

 

Not working 

VAR A = CALCULATE(COUNTROWS(FILTER(TABLE1,TABLE1[DATE] < TODAY())))
VAR B = IF(VALUES(TABLE1[DATE]) < TODAY(), COUNTROWS(TABLE1), BLANK())
RETURN
COUNTROWS(FILTER(TABLE1,TABLE1[DATE] < TODAY()))
2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

Unfortunately, your dax works well in my side:

vzhengdxumsft_0-1707113390345.pngvzhengdxumsft_1-1707113411388.png

 

Maybe you can share your data(without sensitive data), or create a sample data.

How to Get Your Question Answered Quickly - Page 13 - Microsoft Fabric Community

 

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Idrissshatila
Super User
Super User

Hello @Anonymous ,

 

try the following measure

Measure = CALCULATE(COUNTROWS('TABLE1'),'TABLE1'[DATE] < TODAY())


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors