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
Sorry total newbie question but I can't figure it out and couldn't find anything simple for this issue.
I would like to calculate (weighted) Average Price per Unit, of whatever is filtered or sliced and shown in the visual table.
However, it is giving me an average of everything not shown in this table.
How can I calculate this number? Do I need a new measure?
Thanks!
Hi @thesweetp
Is your issue solved?
If the issue has been solved, please adopt the solution to help others.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @thesweetp,
In general, you can do as:
And it will show as your expected output.
If not, please provide your sample data after removing sensitive information, i will check in my environment.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Thanks but it didn't work. (according to my expectations)
The second column is using your formula.
I would expect 1847.63.
I tried to unsummarize and it showed me some more lines, but the calculated average remained the same.
Unsummarized Price per unit:
Is the price per unit column a measure or default summarization? If it's summarized, is it summarized as sum or average?
In this first table (Price per Unit) - is summarized as an AVERAGE
The AveragePrice1 is a measure.
In this second column, it is unsummarized.
Unsummarized Price per unit:
I looked into my original data, and the $2209.65 is correct average of all the CPUs.
However, on the table, I only want it to average what is selected.
Thanks!
Ok, got it. It is weird that since you are using the default summarization, total is displayed as for all. Is it possible for you to share your pbix file?
You will need to modify your measure to CALCULATE(Average(PricePerUnit), ALLSELECTED(TableOrColumn)).
ALLSELECTED modifies the context to the only selected filters.
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 |
---|---|
107 | |
97 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |