Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All,
I am trying to add a new measure that dynamically calculates the average of all the values based on the parameter selection and I am getting an error saying "parameter is not the correct type". I would like this new column to spit out the 17 that is highlighted in the screenshot below.
Any help is greatly appreciated.
thank you!
Solved! Go to Solution.
Hi @mbmcdonald2 ,
Create this measure.
Average Score =
CALCULATE ([Score], ALLSELECTED('OST'))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mbmcdonald2 ,
It works fine through my tests. Can you provide sample pbix files (taking care to protect private data) for us to test?
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Neeko,
Please find a sample file here.
Please let me know if you have any troubles with access.
Thanks!
Maggie
Hi @mbmcdonald2 ,
Create this measure.
Average Score =
CALCULATE ([Score], ALLSELECTED('OST'))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi there,
Thank you so much for the help on this. It appears that while that solution worked for that particular instance, I am having trouble applying correctly to another instance. As you see in the screenshot, the "total" is showing as 19, however, that is incorrect as the average should be closer to 9. Do you have any idea why this might be?
Appreciate any assistance here in advance. Thank you so much!
Hi @v-tangjie-msft - just following up on the above. If you have any insight into this it would be greatly appreciated. Thank you!
This worked! Thank you so much everyone for all of the assistance!
Hi @mbmcdonald2 ,
Thanks to Dangar332 and FreemanZ for their quick replies. I have some other thoughts to add:
Based on your description, the Score you are displaying on the visual object is the measure, correct? If I have misunderstood you please clarify in a follow up reply.
Then we can create a new measure.
Avg = CALCULATE([Score],ALLSELECTED('Table'))
Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
Thanks so much for your continuous help here.
The one challenge here is that the "sub-category" field comes from a parameter, which I believe may require some differences in the formula.
You'll see when I create the formula per your suggestion:
Hi there! Can you please clarify what you mean?
hi @mbmcdonald2 ,
try like:
average =
AVERAGEX(
VALUES(data[sub category]),
[KO Profitability Score]
)
Hi there,
Thanks so much for getting back to me. So when I update per your suggestion above I just get the same values, not the '17' value I was expecting. The first column is based on a parameter and changes between category and sub-category.
Hi, @mbmcdonald2
Try below amended measure
Average KO Profitability Score =
averagex (
allselected(
'Field Select Parameter'[Selection Parameter Fields]),
[KO Profitability Score]
)
Best Regards,
Dangar
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi there,
Thanks so much for your help. The solution is now showing up like this (it should show up as all 17s) using the above formula.
Hi, @mbmcdonald2
You had used a measure as Average argument where it's only accept Column refrence not Measure, try to put score column that shown in screenshot .
Best Regards,
Dangar
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
20 | |
14 | |
11 | |
10 | |
10 |