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
ag779655
Regular Visitor

I'd like to find the median of the purchase price of the delivery in the weekly sales amount.

work 

MAXX(
                 filter ('purchase data',
                 VALUE('Purchase Data' [Product Number])=ValUE('Sales Data' [Product Number])&&
                 'Buy Data' [day]= ('Consolidated Purchase Week' [day])&&
                 'Purchased Data' [market]= 'Sales Data' [market]), 'Purchased Data' [Product Unit Price])

didn't work

MEDIANX or AVERAGEX(
                 filter ('purchase data',
                 VALUE('Purchase Data' [Product Number])=ValUE('Sales Data' [Product Number])&&
                 'Buy Data' [day]= ('Consolidated Purchase Week' [day])&&
                 'Purchased Data' [market]= 'Sales Data' [market]), 'Purchased Data' [Product Unit Price])

 

 

data type sell (weekly)

     day(week)         Product Number   market    sell data(weekly)

    2021-1-3                 45875               market1       4,500

    2021-1-10               45875              market1       4,500

 

data type buy (weekly)

     day(weekly)       Product Number   market    sell data(weekly)

      2021-1-3                45875                  market1       3600

       2021-1-10               45875                  market1       3600

 

In addition, I would like to obtain the median value by adding the data of the month corresponding to the week and the previous month. I wonder if this is possible and the solution. Please help me.

 

Thank you for letting me know if there is a similar case.

 

(I posted it on another board, but there was no answer, so I thought I was mistaken.)

 

 

1 REPLY 1
daxer-almighty
Solution Sage
Solution Sage

"I posted it on another board, but there was no answer, so I thought I was mistaken."

 

Not only were you mistaken. You're very likely not to get any answers here, either (it's already Sunday). If you want to know why, please read this: How to Get Your Question Answered Quickly - Microsoft Power BI Community

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors