Forum Discussion
Sum on Matrix doesn't tie out
- 6 years ago
Hi NBOnecall ,
SUMX should help you. Please create another two measures to work on it.
M1= SUMX('ns SalesRegister',[30DayDemandPerDay])M2 = SUMX('ns SalesRegister',[30DayDemandPerDayTotal])If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
You should see this post: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907 it explains what is happening and how to solve it.
- NBOnecall6 years ago
Helper V
Thank you for that post. I applied that logic to my demand3 30DemandPerDayinStock measure and it still doesn't calulate the sum correctly.
30DayDemandPerDay = DIVIDE(AVERAGE('ns SalesRegister'[Rolling 30 days]),30)30DayDemandPerDayTotal = var _table=SUMMARIZE('ns SalesRegister',[Rolling 30 days],"_value",[30DayDemandPerDay]) Return If(HASONEVALUE('ns SalesRegister'[Rolling 30 days]),[30DayDemandPerDay],sumx(_table,[_value]))- v-frfei-msft6 years ago
Community Support
Hi NBOnecall ,
SUMX should help you. Please create another two measures to work on it.
M1= SUMX('ns SalesRegister',[30DayDemandPerDay])M2 = SUMX('ns SalesRegister',[30DayDemandPerDayTotal])If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
- NBOnecall6 years ago
Helper V
I ended up doing a little bit more research and stumbled upon this formula and it worked for me.
30DaysLostSalesFix = IF(COUNTROWS(VALUES('ns NetsuiteItem'[InternalId]))=1, [30dayLostSales], sumx(VALUES('ns NetsuiteItem'[InternalId]),[30dayLostSales]))