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.
I'm using a measure to count the number of rows in a column "Parked at School" that is a "Y". What is happening is the card visualization is showing a much higher number than the actual. If I click on the card, instead of 1 it display 12. It's as if it's counting it by number of Active Date and not by the Parked at School data! I've been on this since last week and can't find a way how to get the true count. Can someone take a look and see what could be wrong? I appreciate it.
# school bus at school =
IF(ISBLANK([School Bus]),0,COUNTROWS(FILTER(VALUES('School Data'),[Parked at School]="Y")))
Active Date | Driver Name | Parked at School | Number of School Bus |
11/1/2019 | Joe Doe | N | 1 |
12/31/2019 | Tom Jones | Y | 2 |
1/1/2020 | Mary Jones | Y | 1 |
2/1/2020 | Tim Jones | N | 1 |
3/1/2020 | **bleep** Brown | Y | 1 |
4/1/2020 | May Brown | N | 1 |
5/1/2020 | Joe Brown | Y | 1 |
6/1/2020 | |||
7/1/2020 | |||
8/1/2020 | |||
9/1/2020 | |||
10/1/2020 | |||
11/1/2020 | |||
12/1/2020 | |||
Total | 8 | Y | 8 |
Hi @Anonymous ,
I have tested using the sample data and expression you provided, but the result is no problem.
To find the cause of your problem, please share me your .pbix file, removing sensitive information and replace real data with dummy data. It is suggested to upload your file to OneDrive for Business and then paste the link here.
Best Regards,
Icey
Thanks @Icey . I still don't know what is causing the formula to calculate the way it has been... the subtotals are correct but if i select the individual driver names, if it's 1 school bus in the excel, the PBI dax formula displays it as 12 school buses assigned to the driver. But the subtotal and grand totals are correct. I have accepted FrankAT solution. Your confirmation shows that the formula with the sample data is working. Thanks for helping!
@FrankAT, the measure you suggested does not work .. it too is giving a skewered calculation, which is counting all the rows and not the rows for the column that has a 'Y' value.
Hi @Anonymous ,
to illustrate my solution:
Regards FrankAT
Hi @Anonymous ,
use the following measure:
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |