Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
I am trying to count how many Division-Store have zero MEAT SAWS inpsections. Each store may have a different number of saws they are required to inspect once a day. My DAX calculation keeps returning the count of meat saws with zero inspections, not the count of stores.
Here is my DAX:
Solved! Go to Solution.
Hi @A_Scott ,
You can update the formula of measure [Stores with Zero Meat Saw Inspections] as below and check if it can return the expected result...
Stores with Zero Meat Saw Inspections =
IF (
[Meat Saw Count] = 0,
BLANK (),
CALCULATE (
DISTINCTCOUNT ( 'Equip IDs'[Division-Store] ),
FILTER (
'Equip IDs',
'Equip IDs'[Equipment Product Type Descr] = "MEAT SAWS"
&& [Completed Meat Saw Inspections] = 0
)
)
)
If the above one can't help you get the expected result, please provide some raw data in the tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Try this:
tores with Zero Meat Saw Inspections =
IF (
[Meat Saw Count] = 0,
"N/A",
CALCULATE (
DISTINCTCOUNT ( 'Equip IDs'[Division-Store] ),
FILTER ( 'Equip IDs', 'Equip IDs'[Equipment Product Type Descr] = "MEAT SAWS" )
&& FILTER ( 'Equip IDs', [Completed Meat Saw Inspections] = 0 )
)
)
I get an error...
Hi @A_Scott ,
You can update the formula of measure [Stores with Zero Meat Saw Inspections] as below and check if it can return the expected result...
Stores with Zero Meat Saw Inspections =
IF (
[Meat Saw Count] = 0,
BLANK (),
CALCULATE (
DISTINCTCOUNT ( 'Equip IDs'[Division-Store] ),
FILTER (
'Equip IDs',
'Equip IDs'[Equipment Product Type Descr] = "MEAT SAWS"
&& [Completed Meat Saw Inspections] = 0
)
)
)
If the above one can't help you get the expected result, please provide some raw data in the tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
19 | |
13 | |
11 | |
10 | |
9 |