Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Everyone,
calculated weighted average after applying filter on 4 different columns based on a value.
sample columns A, B,C,D,E,F. I have to do something as below :
I need to calculate product = A* B
Then I need to Sum(product) /sum (B)
and filter this based on some conditions
select sum(product)/sum(B) from
(
select DISTINCT A
,B
,C
,E
,A*B as product
from
Table
where C in ('value1','value 2')
and Month in ('APR-21')
and D in ('1')
and F in ('v1','v2','v3')
and E in ('value 1','value2')
) weighted-average
#calculate #filter #sum #average #weightedAverage #powerBI #DAX
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |