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
I have a table called Poperty and with a column called buld date. I need DAX to count the number of dates for the previous 7 days .
FOr the example table below I would expect the resulting count to = 7
| Table_Property |
| Date Built |
| 18/11/2019 |
| 17/11/2019 |
| 17/11/2019 |
| 14/11/2019 |
| 14/11/2019 |
| 14/11/2019 |
| 14/11/2019 |
| 10/11/2019 |
| 09/11/2019 |
| 09/11/2019 |
| 09/11/2019 |
| 09/11/2019 |
| 05/11/2019 |
| 05/11/2019 |
| 05/11/2019 |
| 05/11/2019 |
thank you
RIchard
Solved! Go to Solution.
You can use the today function in a calculate like the following:
Measure =
CALCULATE (
COUNT ( 'Table'[Date Built] );
'Table'[Date Built]
>= ( TODAY () - 7 )
)Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.
Hi @cottrera,
Create a measure to count dates for the past 7 days as like below,
Hi @cottrera,
Create a measure to count dates for the past 7 days as like below,
You can use the today function in a calculate like the following:
Measure =
CALCULATE (
COUNT ( 'Table'[Date Built] );
'Table'[Date Built]
>= ( TODAY () - 7 )
)Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.
Perfect thank you for the quick response
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |