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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

create tabel which will show the latest not null (if possible) tabel data from existing tabels

I have 2 tabels with same coulmn names :

Tabel 1 ---

avengers_0-1684499840255.png

 

Tabel 2 ---

avengers_1-1684499881835.png

 


I need to create tabel 3 which will show the latest not null (if possible) tabel data . If possible means for that particular row , if it can find the MOST RECENT not null value then put that else let it remain null  if it couldn't find any not null data in any of the tabel  for that particular row .

 

So my final tabel 3 should look like this  ---

 

avengers_2-1684499930288.png

 

2 ACCEPTED SOLUTIONS
NaveenGandhi
Super User
Super User

Hello @Anonymous 

 

If appending the table1 and table2 is ok with you, Implement the below solution.

NaveenGandhi_2-1684500396639.png

 

Creat table 3 using the below DAX.


Table 3 =

VAR table_3 =
    FILTER (
        SUMMARIZE (
            Table1,
            Table1[TestCaseName],
            Table1[Date of Execution],
            Table1[Status]
        ),
        Table1[Date of Execution]
            CALCULATE (
                MAX ( Table1[Date of Execution] ),
                ALLEXCEPT ( Table1, Table1[TestCaseName] )
            )
    )
RETURN
    table_3


This would give you the expected result.
NaveenGandhi_3-1684500422188.png
If appeding is something you do not want to do, Let me know i will tweak the DAX accordingly.

Regards
Naveen
 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Anonymous
Not applicable

Thank you so much for the help !! This is exactly what I wanted .Appending the tabels is ok to me as I wanted to put dynamic values only at one place and that is happening now only while doing an append .The rest of the DAX formula is common irrespective of how many tabels I'm appending .I accepted it as the solution.

View solution in original post

5 REPLIES 5
NaveenGandhi
Super User
Super User

Hello @Anonymous 

 

If appending the table1 and table2 is ok with you, Implement the below solution.

NaveenGandhi_2-1684500396639.png

 

Creat table 3 using the below DAX.


Table 3 =

VAR table_3 =
    FILTER (
        SUMMARIZE (
            Table1,
            Table1[TestCaseName],
            Table1[Date of Execution],
            Table1[Status]
        ),
        Table1[Date of Execution]
            CALCULATE (
                MAX ( Table1[Date of Execution] ),
                ALLEXCEPT ( Table1, Table1[TestCaseName] )
            )
    )
RETURN
    table_3


This would give you the expected result.
NaveenGandhi_3-1684500422188.png
If appeding is something you do not want to do, Let me know i will tweak the DAX accordingly.

Regards
Naveen
 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Nice solution. In terms of readability I would prefer:

 

Filtered table = 

SUMMARIZE('Appended table',
    'Appended table'[TestCaseName],
    "Most recent date of Execution",  MAX('Appended table'[Date of Execution]),
    "Status", CALCULATE(MAX('Appended table'[Status]),
        'Appended table'[Date of Execution] = MAX('Appended table'[Date of Execution]),
        'Appended table'[TestCaseName] = EARLIER('Appended table'[TestCaseName])
    )
)
Anonymous
Not applicable

Thank you so much for the help !! This is exactly what I wanted .Appending the tabels is ok to me as I wanted to put dynamic values only at one place and that is happening now only while doing an append .The rest of the DAX formula is common irrespective of how many tabels I'm appending .I accepted it as the solution.

milanpasschier3
Resolver I
Resolver I

Hey man, can you hand the tables in as csv or excel or the table format included in the wysiwyg editor? Makes things easier to have a look. Best, Milan

 

Anonymous
Not applicable

Edited my question with the excel snapshot of the sample data .. Thank you ..Appreciate your time !!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.