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.
Hi everyone,
I am trying to figure out how to A) count the numbers of items per category and B) divide the sales amount for each item per category by the total number of items per category.
I have managed to count the items per category and I've also created a measure to divide the total sales per item by the number of items per category - but the result only shows the total sales divided by the single value for each item per category.
Basically what I am looking for is this:
Any help is appreciated!
Thank you so much!!!
Solved! Go to Solution.
Hey @dlesson22 ,
yes, that's possible.
I would create a measure for the items per category:
Total No per category =
CALCULATE(
COUNTROWS( myTable ),
ALLEXCEPT(
myTable,
myTable[Category]
)
)
And then you can divide the sales by the amount items per category:
Sales per total category =
DIVIDE(
SUM( myTable[Sales] ),
[Total No per category]
)
Hey @dlesson22 ,
yes, that's possible.
I would create a measure for the items per category:
Total No per category =
CALCULATE(
COUNTROWS( myTable ),
ALLEXCEPT(
myTable,
myTable[Category]
)
)
And then you can divide the sales by the amount items per category:
Sales per total category =
DIVIDE(
SUM( myTable[Sales] ),
[Total No per category]
)
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |