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.
Morning All!
I would like to ask for some tips regarding next problem.
I have the following tables in my data model:
The visualizacion I am looking for is Category, average number of diferent skus by store in a given date (today-2)
For instance:
Any recommendations in order to get this visualization with a Dax measure?
Thanks in advance!
Regards
Solved! Go to Solution.
// Not really clear what you want
// but here's an attempt to understand...
[Avg #SKUs (by Store)] =
AVERAGEX(
// Averages the number of all distinct
// SKU's in the current context over all
// visible stores.
SUMMARIZE(
Stock,
Stores[StoreID]
),
CALCULATE(
DISTINCTCOUNT( Stock[sku] )
)
)
// If you slice your data by categories
// it'll return the average number of
// SKU's in the given category/categories.
// Again, the averaging is done over
// all visible stores.
Thank you very much! This was exactly what I was looking for.
Now I need to filter stock table to be able to count skus in a given date (today-2), not in all the stock table.
Thanks again!
Of course, the measure I gave you reacts to any slicing. That was the idea.
By the way, would you please mark my answer as THE answer and give me a thumbs-up?
The former is (almost) required as it'll help others, the latter is optional (as it'll help only me). Thanks.
By the way, where would you introduce a DAX filter sentence to get the stock filtered by date?
Thanks!
Don't know what you really mean... If you start slicing by dates, the measure will adjust itself automatically.
// Not really clear what you want
// but here's an attempt to understand...
[Avg #SKUs (by Store)] =
AVERAGEX(
// Averages the number of all distinct
// SKU's in the current context over all
// visible stores.
SUMMARIZE(
Stock,
Stores[StoreID]
),
CALCULATE(
DISTINCTCOUNT( Stock[sku] )
)
)
// If you slice your data by categories
// it'll return the average number of
// SKU's in the given category/categories.
// Again, the averaging is done over
// all visible stores.
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 |
---|---|
56 | |
27 | |
24 | |
14 | |
9 |
User | Count |
---|---|
77 | |
61 | |
47 | |
17 | |
12 |