cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

## Divide row by row based on criteria (Shoe measure on row)

Hello,

This dax calculates an average based on future months.

However, the amount only shows as a total, but I need it to show in the months that are considered future months.

Can you help?

RF 2 =
VAR MaxDate = MAX(Opex[Month_End_Date])
VAR CurDate = LASTNONBLANK(Opex[Month_End_Date],Opex[Actual1])
VAR LatPeriodwActuals
= CALCULATE(  LASTNONBLANK(Opex[Month_End_Date],Opex[Actual1]), REMOVEFILTERS())
VAR RemainingForecast =

DIVIDE(

([Forecast1] - [Actual1])
,
( DATEDIFF(
CurDate,
MaxDate,

MONTH)),0)

RETURN
2 REPLIES 2
Frequent Visitor

Hi,

I would expect that when Actual1 is nil,

the amount will be displaid on each row in the corresponding row in column RF2.

This shows at the moment, and I expect that the circled field would have the amount required.

This should repeat if there's another blank in column Actual1.

The same amount should repeat. The aount shows in the sum at the moment.

It's calculting the overall difference between Forecast1 and Actual1 and dividing it by the amount of months to go:

Data Set

Sample YTG - Power BI

Super User

@yolandacb can you share excepted output and sample data set.