The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dears,
I have created a new Measure. see below
item ID | Month 1 | Month 2 | Month 3 | Month .... |
1 | 1.2 | 1.2 | 1.2 | 1.2 |
2 | 7.5 | 7.5 | 7.5 | 7.5 |
3 | 4 | 4 | 4 | 4 |
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 ID | Month 1 | Month 2 | Month 3 | Month .... |
1 | 1.2 | 1.8 | 1.25 | 1.7 |
2 | 7.5 | 7.58 | 4.6 | 8.5 |
3 | 4.8 | 4.78 | 4.99 | 4.88 |
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
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
could you pls provide the sample data?
Proud to be a 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