Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi everyone,
I have a table where one of the columns contain text values. In another column, there are some ratings from 0 to 5 against the texts.
I would like to calculate the average or sum of ratings against particular texts/unique texts. How should I go about this please?
Many thanks for your help.
Solved! Go to Solution.
Hi @Klam ,
According to your description, I create a sample.
If you just want to show the sum or average of each Text column, simply put the two columns in a visual and select Sum/Average in the Columns pane.
If you want to create columns in the table, here's the solution.
Sum =
SUMX (
FILTER ( 'Table', 'Table'[Text] = EARLIER ( 'Table'[Text] ) ),
'Table'[Ratings]
)
Average =
AVERAGEX (
FILTER ( 'Table', 'Table'[Text] = EARLIER ( 'Table'[Text] ) ),
'Table'[Ratings]
)
Result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Klam ,
According to your description, I create a sample.
If you just want to show the sum or average of each Text column, simply put the two columns in a visual and select Sum/Average in the Columns pane.
If you want to create columns in the table, here's the solution.
Sum =
SUMX (
FILTER ( 'Table', 'Table'[Text] = EARLIER ( 'Table'[Text] ) ),
'Table'[Ratings]
)
Average =
AVERAGEX (
FILTER ( 'Table', 'Table'[Text] = EARLIER ( 'Table'[Text] ) ),
'Table'[Ratings]
)
Result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so very much! Precisely what I needed! 🙂
@Klam
Please provide some sample or example data. you can somple create your data in Excel and paste here and also show what is the expected out put.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |