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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
kumsha1
Post Patron
Post Patron

Fill down the values in a calculated column

Hi,

 

How can i fill down the values of Tonnes Line?. I have asked this Q before with no luck, hence asking again...TIA

 

kumsha1_0-1605578996064.png

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @kumsha1 ,

 

For calculated column, you can create a new column for it:

 

 

New PROGRESSIVE_TONNES = 
VAR LastNonBlankIndex =
    CALCULATE (
        LASTNONBLANK ( TRANSHIPPER_DETAILS[Index], 1 ),
        FILTER (
            ALL ( TRANSHIPPER_DETAILS ),
            TRANSHIPPER_DETAILS[Index] <= EARLIER ( TRANSHIPPER_DETAILS[Index] )
                && NOT ( ISBLANK ( TRANSHIPPER_DETAILS[PROGRESSIVE_TONNES] ) )
        )
    )
RETURN
    CALCULATE (
        SUM ( TRANSHIPPER_DETAILS[Value] ),
        FILTER ( ALL ( TRANSHIPPER_DETAILS ), TRANSHIPPER_DETAILS[Index] = LastNonBlankIndex )
    )

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

6 REPLIES 6
v-deddai1-msft
Community Support
Community Support

Hi @kumsha1 ,

 

For calculated column, you can create a new column for it:

 

 

New PROGRESSIVE_TONNES = 
VAR LastNonBlankIndex =
    CALCULATE (
        LASTNONBLANK ( TRANSHIPPER_DETAILS[Index], 1 ),
        FILTER (
            ALL ( TRANSHIPPER_DETAILS ),
            TRANSHIPPER_DETAILS[Index] <= EARLIER ( TRANSHIPPER_DETAILS[Index] )
                && NOT ( ISBLANK ( TRANSHIPPER_DETAILS[PROGRESSIVE_TONNES] ) )
        )
    )
RETURN
    CALCULATE (
        SUM ( TRANSHIPPER_DETAILS[Value] ),
        FILTER ( ALL ( TRANSHIPPER_DETAILS ), TRANSHIPPER_DETAILS[Index] = LastNonBlankIndex )
    )

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

Hi @amitchandak ,

 

Its required in a calculated column/measure then i have a requirement to cal. earlier values of this Tonne Line and use this in other calculations.

 

RunningMax(Tonnes Line) - Earlier(Tonnes Lines)

Below is the required output.

 

kumsha1_2-1605582060299.png

 

 

mahoneypat
Employee
Employee

Please provide the expression for the Tonnes Line measure.

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi @mahoneypat ,

 

Below is the formula, i have this as calculated column/measure.

 

TONNES_LINE = IF(ISBLANK([PROGRESSIVE_TONNES]) || [PROGRESSIVE_TONNES]=0,TRANSHIPPER_DETAILS[PROGRESSIVE_TON_START],TRANSHIPPER_DETAILS[PROGRESSIVE_TONNES])
Tonnes Line = IF(ISBLANK([Progressive Tonnes]) || [Progressive Tonnes]=0,[Progressive Ton Start],[Progressive Tonnes])

 

kumsha1_0-1605581287215.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.