Forum Discussion
Kimbornhoft
Helper I
9 years agoIncorrect calculated measure total
Hi, I have a new measure Total Shipped Value = (sum(REV_HistoryReport[Total Li Valu Amt]) /sum(REV_HistoryReport[Ord Bill Unit Qty]) * sum(OpenOrders[Qty Filled])) which works correctly ...
Kimbornhoft
Helper I
9 years agoThis solves the issue 99% of the time. Here is an exception: the correct total is $59,051 but Power BI is doubling that total when an item appears muliple times to $118,102.
| 3131BE | 1/10/2017 | $29,526 | 189 |
| 3131BE | 1/10/2017 | $29,526 | 189 |
Anonymous
9 years agoNot applicable
I'm not totally sure which table we are talking about, but... errr, uhh... if we are talking about double rows in REV_HistoryReport, maybe inside the CALCULATE divide by COUNTROWS(REV_HistoryReport) ?
- Kimbornhoft9 years ago
Helper I
I have used this string,
Total Shipped Value = SUMX(REV_HistoryReport, CALCULATE(sum(REV_HistoryReport[Total Li Valu Amt])/sum(REV_HistoryReport[Ord Bill Unit Qty]) * sum(OpenOrders[Qty Filled])))
but I'm not sure where to incorporate the count rows Could you help with this?
- Kimbornhoft9 years ago
Helper I
You were right in assuming it is the REV history report.
- Anonymous9 years agoNot applicable
Total Shipped Value =
SUMX (
REV_HistoryReport,
CALCULATE (
SUM ( REV_HistoryReport[Total Li Valu Amt] )
/ SUM ( REV_HistoryReport[Ord Bill Unit Qty] )
* SUM ( OpenOrders[Qty Filled] )
/ COUNTROWS(REV_HistoryReport)
)
)