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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
OMS_POWERBI
New Member

I created a new measure but the values are not changing in each column

 

Dears,

 

I have created a new Measure. see below  

 

AVG Price = DIVIDE(
    sum('PO_DETAILS_RPT'[REC_TOT_PRICE]),
    sum('PO_DETAILS_RPT'[QTY_RECEIVED])
)
 
I created a matrix  like this to report the average price per item per month
 
item IDMonth 1Month 2Month 3Month ....
11.21.21.21.2
27.57.57.57.5
34444

 

the problem is that the prices are not constant and keep changing from day to day but in the report is showing as constant month on month. Maybe I need to modify my measure a little bit. the expected output is something like this

 

item IDMonth 1Month 2Month 3Month ....
11.21.81.251.7
27.57.584.68.5
34.84.784.994.88
5 REPLIES 5
OMS_POWERBI
New Member

I guess the source of error coming from the aggregation of the  [REC_TOT_PRICE] and [QTY_RECEIVED] . maybe the report is getting both [REC_TOT_PRICE] and [QTY_RECEIVED] for all time

Hi, @OMS_POWERBI 

Can you share relevant formulas of the [REC_TOT_PRICE] and [QTY_RECEIVED]?

If possible, please share a sample pbix for further research.

 

Best Regards,
Community Support Team _ Eason

OMS_POWERBI
New Member

@amitchandak 

 

thanks for your support.

 

The below formula returned an unrealistic number. maybe because of the red part 

 

AVG Price = DIVIDE(
sumX('PO_DETAILS_RPT', 'PO_DETAILS_RPT'[REC_TOT_PRICE]* 'PO_DETAILS_RPT'[QTY_RECEIVED]),
sum('PO_DETAILS_RPT'[QTY_RECEIVED])
)

 

the second formula did not work. it give syntax error

ryan_mayu
Super User
Super User

@OMS_POWERBI 

could you pls provide the sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@OMS_POWERBI , I think it should be like this

 

AVG Price = DIVIDE(
sumX('PO_DETAILS_RPT', 'PO_DETAILS_RPT'[REC_TOT_PRICE]* 'PO_DETAILS_RPT'[QTY_RECEIVED]),
sum('PO_DETAILS_RPT'[QTY_RECEIVED])
)

 

 

TO make it constant , try allexcept

AVG Price =calculate(  DIVIDE(
sumX('PO_DETAILS_RPT', 'PO_DETAILS_RPT'[REC_TOT_PRICE]* 'PO_DETAILS_RPT'[QTY_RECEIVED]),
sum('PO_DETAILS_RPT'[QTY_RECEIVED])
), allexcept('PO_DETAILS_RPT', 'PO_DETAILS_RPT'[Month Year]) )

 

//you can use your formula too

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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