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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors