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
seanrm42
Frequent Visitor

Null Value Boolean Correction for Software Analysis

I have the following tables linked together by application name:

 

Application Name:         Family:         Verssion: 

App9                              Fam1            9

App8                              Fam1            8              

App7                              Fam1            7                

App6                              Fam1            6                  

App5                              Fam1            5                   

App4                              Fam1            4                   

App3                              Fam1            3                              

 

Application Name:         Support End Date:        Support Ended?:

App9                                                                    FALSE     

App8                              1/1/2015                       TRUE     

App7                              1/1/2015                       TRUE   

App6                              1/1/2015                       TRUE   

App5                                                                    FALSE   

App4                                                                    FALSE  

App3                                                                    FALSE

 

The Support Ended column is a added custom column. The application family is the grouping for which the applications are segemented in to. 

 

The Support End Date column is null for some of the older applications which is turning the boolean column in to false negatives.

 

The boolean formula is calculating if the support end date is not null and before today then TRUE.

 

What can I add in to the formula or column can I create to change the boolean to TRUE if the application has another application within the family of a higher version with a support end date before today?

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee

@seanrm42

You can try to create a calculated column as 

Support Ended? =
VAR last_app_ver_SE_date_is_not_null =
    MINX (
        FILTER (
            Table2,
            EARLIER ( RELATED ( Table1[Version] ) ) < RELATED ( Table1[Version] )
                && RELATED ( Table1[Family] ) = EARLIER ( RELATED ( Table1[Family] ) )
                && NOT ( ISBLANK ( Table2[Support End Date] ) )
                && Table2[Support End Date] < TODAY ()
        ),
        RELATED ( Table1[Version] )
    )
RETURN
    SWITCH (
        TRUE (),
        NOT ( ISBLANK ( Table2[Support End Date] ) )
            && Table2[Support End Date] < TODAY ()
            || NOT ( ISBLANK ( last_app_ver_SE_date_is_not_null ) ), TRUE (),
        FALSE ()
    )

Capture.PNG

View solution in original post

3 REPLIES 3
Eric_Zhang
Employee
Employee

@seanrm42

You can try to create a calculated column as 

Support Ended? =
VAR last_app_ver_SE_date_is_not_null =
    MINX (
        FILTER (
            Table2,
            EARLIER ( RELATED ( Table1[Version] ) ) < RELATED ( Table1[Version] )
                && RELATED ( Table1[Family] ) = EARLIER ( RELATED ( Table1[Family] ) )
                && NOT ( ISBLANK ( Table2[Support End Date] ) )
                && Table2[Support End Date] < TODAY ()
        ),
        RELATED ( Table1[Version] )
    )
RETURN
    SWITCH (
        TRUE (),
        NOT ( ISBLANK ( Table2[Support End Date] ) )
            && Table2[Support End Date] < TODAY ()
            || NOT ( ISBLANK ( last_app_ver_SE_date_is_not_null ) ), TRUE (),
        FALSE ()
    )

Capture.PNG

I cannot tell you how appreciative and amazed I am that you contructed that quickly.

 

Many thanks from me to you and this community.

Glad to help. 🙂

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.