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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
GiuseppeTE
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

Hello Muhammad,

 

your formula work perfectly.

thanks a lot

Giuseppe

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@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 )
    )

 


Regards
Zubair

Please try my custom visuals

Hello Muhammad,

 

your formula work perfectly.

thanks a lot

Giuseppe

HI @GiuseppeTE 

 

Thanks for the feedback

 

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


Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors