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
Syndicate_Admin
Administrator
Administrator

SUM PRODUCT BETWEEN DATA AND QUANTITY DAYS

Good morning

I would need if they can help me since I am a newbie to Power Bi.

The reality is that I need to obtain a data, in excel it has the following formula: =SUMPRODUCT(BR7:BT7; BR3:BT3)/SUMPRODUCT(BR3:BT3)

BR7 to BT7 are Demand data (number of vehicles transited)

BR3 to BT3 are the number of days (in this case it was 31 days of January 28 February and 15 days of March that we have)

This result gives me an (accumulated) value that serves as a reference as we come.

The idea is to replicate this calculation as a new measure and that you can calculate it as you add information to the excel.

Could you help me?

Thank you!

Captura.JPG

1 ACCEPTED SOLUTION

TMDM = (AVERAGE(AUSOL[Demand])*AVERAGE(AUSOL[Number of Days]))/AVERAGE(AUSOL[Number of Days])

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

I tried to use the formula you sent me, however it is not the solution.
I also tried to replicate the formula of excel: =+SUMPRODUCT(BR7;$BR$3)/SUM($BR$3)
to a measure:
accumulated = (PRODUCTX(AUSOL,AUSOL[Demand]) & PRODUCTX(AUSOL, AUSOL[Number of Days])) / (SUMX(AUSOL, AUSOL[Number of Days]))
but it doesn't work, could they guide me?
because this should be the sum product of "demand" and quantity days // a kind of weighted average // divided the sum product of the number of days.
This is very helpful, thank you!

TMDM = (AVERAGE(AUSOL[Demand])*AVERAGE(AUSOL[Number of Days]))/AVERAGE(AUSOL[Number of Days])
amitchandak
Super User
Super User

@Syndicate_Admin , You have function productX if that can help

 

OR Sumx(Table, [A]*[B])

 

https://docs.microsoft.com/en-us/dax/productx-function-dax

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.