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 am trying to count the rows of a table based on two criteria.
Criteria 1 - SLA Pass = "NO"
Criteria 2 - Date Logged >= 01/09/2020
The result I would exspect based on the sample table below would be equal to 4
I have tried this DAX measure
This measure works for the count rows and SLA Pass = No but seems to ignore date criteria?
Repairs Table | |||
Date Logged | Date Completed | Trade | SLA Passed |
01/08/2020 | 01/08/2020 | Plumbing | Yes |
12/08/2020 | 12/08/2020 | Plumbing | Yes |
11/08/2020 | 11/08/2020 | Plumbing | Yes |
17/08/2020 | 18/08/2020 | Plumbing | Yes |
01/09/2020 | 01/09/2020 | Plumbing | No |
01/09/2020 | 20/09/2020 | Plumbing | Yes |
07/08/2020 | 07/08/2020 | Electrical | No |
17/09/2020 | 17/10/2020 | Electrical | No |
03/09/2020 | 03/09/2020 | Electrical | No |
06/08/2020 | 06/09/2020 | Electrical | No |
25/08/2020 | 25/09/2020 | Electrical | No |
25/08/2020 | 25/09/2020 | Electrical | No |
15/08/2020 | 15/09/2020 | Electrical | No |
14/08/2020 | 14/09/2020 | Electrical | Yes |
14/09/2020 | 14/09/2020 | Electrical | Yes |
16/09/2020 | 16/09/2020 | Electrical | No |
18/08/2020 | 18/08/2020 | Roofing | Yes |
21/08/2020 | 21/08/2020 | Roofing | Yes |
13/08/2020 | 13/10/2020 | Roofing | No |
29/08/2020 | 29/08/2020 | Roofing | Yes |
21/08/2020 | 21/08/2020 | Roofing | No |
07/09/2020 | 07/10/2020 | Roofing | Yes |
thanks
Richard
Solved! Go to Solution.
@cottrera , Try like
Measure = CALCULATE(
COUNTROWS(Repairs Table),
RepairsTable, Repairs Table[SLA Pass] ="NO",
Repairs Table[Date Logged]>= date(2020,09,01))
@cottrera , Try like
Measure = CALCULATE(
COUNTROWS(Repairs Table),
RepairsTable, Repairs Table[SLA Pass] ="NO",
Repairs Table[Date Logged]>= date(2020,09,01))
Great that works!
thank you
Richard
Hi,
I think you are passing date in "dd/mm/yyyy" format whereas powerbi is filtering in "mm/dd/yyyy".
Can you pass date using Date function and try.
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Hi nvprasad thank you for responding but the suggestion did not work for me. I tried amitchandak suggesting which I posted as a solution.
thanks again RIchard
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |