Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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).
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |