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,
i'm a brand new Power BI user and want to calculate the average of column entries, where the status "Aktiv"(Active in german) applies.
(The filtered view of my table)
I already tried the SUM function, but i always get the error message, that the SUM function cannot use values of type string, which confuses me, since its all float values in column 11
Am i missing something obvious?
Solved! Go to Solution.
Hi, @BI_Newbie0503
Thanks @_AAndrade solution and your solution is great. Has your current issue been resolved? If not, perhaps you can try the following workarounds, Here's the sample data I used:
Make sure that your column11 is recognized as a decimal number in Power BI. Then you can try creating a measure like this:
Column11Average =
AVERAGEX ( FILTER ( 'Table', 'Table'[Column3] = "Aktiv" ), 'Table'[Column11] )
You can use this measure in card or table visuals.
If you want to show an average for each row, you can add an ALLSELECTED function on top of the original expression to clear the filtering for the outer table visual row labels.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @BI_Newbie0503
Thanks @_AAndrade solution and your solution is great. Has your current issue been resolved? If not, perhaps you can try the following workarounds, Here's the sample data I used:
Make sure that your column11 is recognized as a decimal number in Power BI. Then you can try creating a measure like this:
Column11Average =
AVERAGEX ( FILTER ( 'Table', 'Table'[Column3] = "Aktiv" ), 'Table'[Column11] )
You can use this measure in card or table visuals.
If you want to show an average for each row, you can add an ALLSELECTED function on top of the original expression to clear the filtering for the outer table visual row labels.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ok. The problem is because the column that you are using to do the average is type string intead of numeric.
Change the data type to numeric on Power Query and that issue will be solved.
Proud to be a Super User!
Hi @BI_Newbie0503,
Please try something like this:
CALCULATE(
AVERAGE ( Your column name to do the average ),
FILTER(
ALL( Your table Name),
Your column Name where you have the condition = "Aktiv"
)
)
This should work, but if you have any problem, please let me know.
Proud to be a Super User!
Thanks for the help, but i still get the error message, that the function average cant use values of type string
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |