Forum Discussion
bschwantner
4 years agoFrequent Visitor
Measure applied to rows based on conditional With Totals Adding up.
I want a measure to dynamically show the correct target revenue for a given time period so I can compare it to actuals. I am having trouble taking an annualized target revenue and breaking it up to a...
tamerj1
Community Champion
4 years agoHi bschwantner
[isTradingDay] column is in which table?
Supposing that it is in the date table and that [DailyTargets] is a measure then you may try
CustomPeriodTradingDayTargets =
VAR startP =
FIRSTDATE ( DateTable[Date] )
VAR endP =
LASTDATE ( DateTable[Date] )
VAR daysinP =
DATEDIFF ( startP, endP, DAY ) + 1
RETURN
SUMX (
DateTable,
IF ( DateTable[isTradingDay] = 1, [DailyTargets] * daysinP, 0 )
)