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, I have had a dax formula which was working when I was working in excel with the same data. Now, I've uploaded the same data and tried to apply the same dax formula but it didn't work. Can you help me please? My formula is: =CALCULATE(COUNT([Pers.no.]);FILTER(ALL('DATASET'[Data Tarihi]);[Data Tarihi]=MAX([Data Tarihi])))
persn.no: number
data tarihi:date
Solved! Go to Solution.
Try this
Measure =
CALCULATE (
COUNT ( [Pers.no.] );
FILTER ( ALL ( 'DATASET' ); 'DATASET'[Data Tarihi] = MAX ( 'DATASET'[Data Tarihi] ) )
)
If it is still failing, we will need to see what your model and sample data looks like.
Hope this helps
David
Hi @brcnyc - please be more specific on what "not working" means. Does it give an error? Is it not showing the expected answers? Please share what Excel looks like where it works. Any other information about the data model and sample data would be helpful as well. See this link: How-to-Get-Your-Question-Answered-Quickly
David
Hi, yes I get an error message: A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed." In my excel workbook, I was using this formula. I had an HR dashboard. This formula was showing the number of head counts for the last month even if you do not choose the latest month from a filter. because the formula was = max(date) as I've shown above.
Try this
Measure =
CALCULATE (
COUNT ( [Pers.no.] );
FILTER ( ALL ( 'DATASET' ); 'DATASET'[Data Tarihi] = MAX ( 'DATASET'[Data Tarihi] ) )
)
If it is still failing, we will need to see what your model and sample data looks like.
Hope this helps
David
I did it thank you very much 🙂
Thank you very much for your help, but it didn't work. It shows empty. I attached the photos of my data. What I want to do here is, the formula should show the head count numbers for the latest date in the data (which is 01.06.2020 in the data).
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |