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 All,
I want to have a calculated column (column H) such that Sum of Values from Column H corresponding to each unique WS Id(Column A) must be divided by count of that Unique WS Id(Column A).
Given Data Table:
Expected Output Table:
Example: In this for WS Id WS 887180323, value in H2 is (B2 value 56+ C2 value 80+ D2 value 81.6+ E2 value 60+ F2 value 80)/Count of Corresponding WS Id(A2 in this case 5)=71.52 ....And so on...
Thanks a lot !!!
Solved! Go to Solution.
Hi @Anonymous
Create a measure like this :
Measure =
VAR _SUM=CALCULATE(SUM('Table'[Commercial])+SUM('Table'[Delivery])+SUM('Table'[Price])+SUM('Table'[Quality])+SUM('Table'[Sustainability & Risk Management])+SUM('Table'[Technology]),ALLEXCEPT('Table','Table'[WS Id]))
VAR _COUNTROWS=CALCULATE(COUNT('Table'[WS Id]),ALLEXCEPT('Table','Table'[WS Id]))
RETURN DIVIDE(_SUM,_COUNTROWS)
Then you will get a result like this :
For each of your WS Id, there is only one data per column, so you can choose to set all numeric fields in the table to sum.
You will get a result like this :
If you don’t want to show the Total , you can turn it off in Totals .
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Create a measure like this :
Measure =
VAR _SUM=CALCULATE(SUM('Table'[Commercial])+SUM('Table'[Delivery])+SUM('Table'[Price])+SUM('Table'[Quality])+SUM('Table'[Sustainability & Risk Management])+SUM('Table'[Technology]),ALLEXCEPT('Table','Table'[WS Id]))
VAR _COUNTROWS=CALCULATE(COUNT('Table'[WS Id]),ALLEXCEPT('Table','Table'[WS Id]))
RETURN DIVIDE(_SUM,_COUNTROWS)
Then you will get a result like this :
For each of your WS Id, there is only one data per column, so you can choose to set all numeric fields in the table to sum.
You will get a result like this :
If you don’t want to show the Total , you can turn it off in Totals .
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Can you providw sample data file?
Below is the sample data:
Sorry, can't attach pbix file as the option of attaching file is not available to me.
Hi @Anonymous
Use a table visual and add the 7 columns as measures:
SUM ( TabaleNsme[ColumnName] )
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 |
---|---|
47 | |
26 | |
19 | |
15 | |
10 |
User | Count |
---|---|
57 | |
50 | |
44 | |
21 | |
19 |