Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Good morning community,
Below is a tableI have which indicates stock in each location (Total Stock Qty = Both Warehouses) I'm looking to create a seperate card visual which will show a total count of all the locations which have a zero value but cant seem to string the right DAX together.
If anyone could suggest the correct path here that would be greatly appriciated 🙂
You have not shown the model, so I have to work with what you've shown...
[# Locations with 0 StQty] =
COUNTROWS(
FILTER(
DISTINCT( T[Location] ),
[Total stock qty] = 0
)
)
Hi and thank you for your reply, I have inserted the below which is very similiar to my solution and have pretty similar results
But when I insert the dax into my card I get a massively inflated value, as you can visually count the answer should be 13 as there are only 13 that have zero
If this does not work, it means something else is at play here. But you're not showing everything that's essential. DAX output depends heavily on the model and the relationships between tables. Therefore the same formula can return different results if the underlying data model is different. I wrote the measure with assumptions that may be wrong in this particular instance. You'll have to either show the model, or - better still - give us a link to a shared file with some example data. Then one can with certainty tell you where it's gone wrong. Otherwise, it's a mere guessing.
Sure thing, let me explain a bit more about the relationship as the data is simple:
We have 2 brands within the same warehouse so I have extracted the data from 2 seperate databases and exported them to excel.
The link between the 2 in this instance is the Location. Location Planner WA development is the main table and the Location Planner GA WA development shares the same locations.
I have created a a column which pulls in the value from GA table
User | Count |
---|---|
42 | |
28 | |
23 | |
18 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |