March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Desired result: get sum of Sales by workdays (sum of monthly diff) = 129,496 instead of 196,024.74
Background: trying to get the grand total sum of monthly difference between the average of sales by workdays. Have figured out all the parts including getting grand total of averages but it does not work with month;y differences. Ruled out hasonevalue as it works fine with sum of averages.
Thanks to the community help, I am confident about getting the sum of averages from this previous post. Don't know how to troubleshoot the sum of diff of avgs though.
Details
DIVIDE( SUM(financials[Sales]), [Num Of Workdays] )
IF (
HASONEVALUE ( 'Date'[Month Year] ),
[Sales by Workdays (avg)],
SUMX ( VALUES ( 'Date'[Month Year] ), [Sales by Workdays (avg)] )
)
CALCULATE( financials[Sales by Workdays (avg)], PREVIOUSMONTH( 'Date'[Date] ) )
financials[Sales by Workdays (avg)] - financials[Sales by Workday (avg prev month)]
var x = [Sales by Workday (monthly diff)]
Return
IF( HASONEVALUE( 'Date'[Month Year] ), x,
SUMX( VALUES( 'Date'[Month Year] ), x )
)
Solved! Go to Solution.
Hi @VinhTon ,
Please simply use:
Sales by Workdays (sum of monthly diff) = SUMX(VALUES('Date'[Month Year]),[Sales by Workday (monthly diff)])
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @VinhTon ,
Please simply use:
Sales by Workdays (sum of monthly diff) = SUMX(VALUES('Date'[Month Year]),[Sales by Workday (monthly diff)])
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks you!
Hi @VinhTon ,
You may try :
Measure =
var _t= SUMMARIZE(ALLSELECTED(financials),financials[Month Year],"sum",[Sales by Workday (monthly diff)])
return IF(HASONEVALUE(financials[Month Year]) ,[Sales by Workday (monthly diff)], SUMX(_t,[sum]))
If it still not work , please share me with your pbix file after removing sensitive data. Refer to:
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could try
Sales by Workdays (sum of monthly diff) =
IF( ISINSCOPE( 'Date'[Month Year]), [Sales by Workday (monthly diff)],
SUMX( VALUES('Date'[Month Year]), [Sales by Workday (monthly diff)] )
)
Also gives 196,024
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
120 | |
77 | |
60 | |
54 | |
40 |
User | Count |
---|---|
191 | |
103 | |
87 | |
61 | |
50 |