Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
yolandacb
Helper I
Helper I

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
yolandacb
Helper I
Helper I

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:

 

yolandacb_0-1679654343489.png

 

Data Set

 

Sample YTG - Power BI

Mahesh0016
Super User
Super User

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.