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
I have data in the following format:
Supplier ID Rating Value
------------- ------------------
123 4
123 5
234 1
567 2
345 4
234 4
I want to find the count of suppliers whose average rating is between 4 and 5.
Average rating of a supplier = Sum of Ratings received by the supplier/Total no. of ratings received by the supplier
Solved! Go to Solution.
Try thsi MEASURE
Count_of_Suppliers = COUNTROWS ( FILTER ( ALLSELECTED ( Table1[Supplier ID] ), CALCULATE ( AVERAGE ( Table1[Rating Value] ) ) >= 4 && CALCULATE ( AVERAGE ( Table1[Rating Value] ) ) <= 5 ) )
Try thsi MEASURE
Count_of_Suppliers = COUNTROWS ( FILTER ( ALLSELECTED ( Table1[Supplier ID] ), CALCULATE ( AVERAGE ( Table1[Rating Value] ) ) >= 4 && CALCULATE ( AVERAGE ( Table1[Rating Value] ) ) <= 5 ) )
Thanks a lot Zubair, its working
Can we help me with another condition please.
How to calculate the number of Suppliers with Average Rating between 4 and 5 but will only consider the Suppliers who have got more than one rating count.
You can add another condition as follows
Count Of Suppliers = COUNTROWS ( FILTER ( ALLSELECTED ( Table1[Supplier ID] ), CALCULATE ( AVERAGE ( Table1[Rating Value] ) ) >= 4 && CALCULATE ( AVERAGE ( Table1[Rating Value] ) ) <= 5 && CALCULATE ( COUNT ( Table1[Rating Value] ) ) > 1 ) )
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 |
---|---|
113 | |
97 | |
79 | |
74 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |