The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi guys,
I am currently trying to create a measure that counts a date field and filters on the date. The measure looks something like this
Solved! Go to Solution.
Hi @Anonymous
Please make a little bit change to your Measure like this:
New Contract Fiscal YTD = CALCULATE(COUNT('TableName'[Agreement Date]), FILTER('TableName', 'TableName'[Agreement Date] >= DATE(2021,4,1)))
Then you should see the result like this:
Best Regards,
Community Support Team _ Caiyun
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Please make a little bit change to your Measure like this:
New Contract Fiscal YTD = CALCULATE(COUNT('TableName'[Agreement Date]), FILTER('TableName', 'TableName'[Agreement Date] >= DATE(2021,4,1)))
Then you should see the result like this:
Best Regards,
Community Support Team _ Caiyun
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
This worked perfectly! Thanks for that. I have a quick question, I wanted to do something similar like this but have the filter be the oldest date that is active in the table. I created a measure that grabs the oldest date that is active then tried to use that as the filter. Any suggestions?
Hello friend, see if this solution suits you.
I made the file available in my folder on GitHub:
https://github.com/roolsant/SOSPowerBI/blob/main/wsmith1.zip
What I did was create a measure of COUNT and then I created another one by applying the filter.
it is possible to apply the filter directly as below:
But I use the date in numeric format:
CountFiltered = CALCULATE(COUNT(fSales[Date]), fSales[Date] >= 44200)
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
12 | |
9 | |
7 |