Forum Discussion
james8992
6 years agoFrequent Visitor
Another DAX Calculation Total Not Working
I'm working with consulting projects and am adjusting the schedule if the 90 schedule is greater then the hours remaining in the project (Backlog Hours). In the example, the project is scheduled for 300 hours but there are only 145.75 remaining. I have a DAX formula to correctly apply this at the project level where there is FILTER context but have not been able to solve for the total since the total for 90 Days Schedule and 90 Day Schedule Adj should not be the exact same due to my formula reducing the schedule when greater than the remaining hours.
Hours Scheduled =
SUM('Consulting Forecast Hours Fact_V'[SumTotalHours])
90 Days Schedule =
SUMX (
VALUES ( Date_V[Date] ),
IF (
AND ( Date_V[Date] >= TODAY (), Date_V[Date] <= TODAY () + 90 ),
[Hours Scheduled],
BLANK ()
))
90 Day Schedule Adj =
SUMX(
SUMMARIZE(VALUES('SF Project_V'[Project Name]),
"BV", [Total Backlog Hours_R],
"90 Day Schedule1", [90 Days Schedule]),
MIN([BV], [90 Day Schedule1]))
Thanks in advance
- Anonymous6 years ago
VAR tbl =
ADDCOLUMNS(
SUMMARIZE(
VALUES('SF Project_V'[Project Name]),"BV", [Total Backlog Hours_R],"90 Day Schedule1", [90 Days Schedule]
),"MinVal",MIN([BV], [90 Day Schedule1])
)RETURNSUMX(tbl;
[MinVal]
)
5 Replies
- AnonymousNot applicable
VAR tbl =
ADDCOLUMNS(
SUMMARIZE(
VALUES('SF Project_V'[Project Name]),"BV", [Total Backlog Hours_R],"90 Day Schedule1", [90 Days Schedule]
),"MinVal",MIN([BV], [90 Day Schedule1])
)RETURNSUMX(tbl;
[MinVal]
)- AnonymousNot applicable
just change the seperator commonly used in Europa ";" to "," AND you have to keep the name of the function
90 Day Schedule Adj =
VAR tbl = ...