cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GiuseppeTE Frequent Visitor
Frequent Visitor

dax formula to complete table with lastnoblank value

Hello,

 

this is my first time in the comunity and I am a new user of power bi.

The issue I would like to solve is the follow:

I have to table like below:

table join.JPG

 

where the table 1 have a calculated column with the following formula: 

Output calculated = SUMX(
                                   RELATEDTABLE(Tabella2);
                                                 Tabella2[outputactual]
                                 )

 

table 1.JPG

 

now the issue is:

how I can fill the rest of blank value in the column calculated  with the last one value (15) ? 

 

below the related table2:

table2.JPG

 

thanks in advance for every one would like help me.

Giuseppe

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
GiuseppeTE Frequent Visitor
Frequent Visitor

Re: dax formula to complete table with lastnoblank value

Hello Muhammad,

 

your formula work perfectly.

thanks a lot

Giuseppe

View solution in original post

3 REPLIES 3
Super User
Super User

Re: dax formula to complete table with lastnoblank value

@GiuseppeTE 

 

Try this column

 

=
VAR lastavailabledata =
    CALCULATE (
        MAX ( Tabella2[dataworked] ),
        FILTER ( ALL ( Tabella2 ), Tabella2[dataworked] <= Tabella1[data] )
    )
RETURN
    CALCULATE (
        SUM ( Tabella2[outputactual] ),
        FILTER ( ALL ( Tabella2 ), Tabella2[dataworked] = lastavailabledata )
    )

 

Highlighted
GiuseppeTE Frequent Visitor
Frequent Visitor

Re: dax formula to complete table with lastnoblank value

Hello Muhammad,

 

your formula work perfectly.

thanks a lot

Giuseppe

View solution in original post

Super User
Super User

Re: dax formula to complete table with lastnoblank value

HI @GiuseppeTE 

 

Thanks for the feedback

 

Please mark the correct answer as solution. I see that you marked your own reply as ANSWER.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 161 members 2,002 guests
Please welcome our newest community members: