Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Sania-F
Frequent Visitor

calculated weighted average after applying filter on 4 different columns based on a value

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

0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.