Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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 November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.