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
HenryJS
Post Prodigy
Post Prodigy

IF Dates Less Than Or Blank

Hi all,

 

How can I create a column/measure which states the below:

 

IF [Combined Business Insurance Policy] is blank or less than today

 

Return "Insurance Missing"

 

OR

 

IF [Proffesional Indemnity Insurance Policy] AND [Public Liability Insurance] is blank or less than today

 

Return "Insurance Missing"

 

Capture.PNG

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @HenryJS ,

 

Would you please try the following calculated column, it will work:

Column =
IF (
    ISBLANK ( 'Table'[Combined Business Insurance Policy] )
        || 'Table'[Combined Business Insurance Policy] < TODAY (),
    "Insurance Missing",
    IF (
         (
            'Table'[Proffesional Indemnity Insurance Policy] < TODAY ()
                || ISBLANK ( 'Table'[Proffesional Indemnity Insurance Policy] )
        )
            && (
                'Table'[Public Liability Insurance] < TODAY ()
                    || ISBLANK ( 'Table'[Public Liability Insurance] )
            ),
        "Insurance Missing",
        BLANK ()
    )
)

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

 

 

View solution in original post

7 REPLIES 7
v-deddai1-msft
Community Support
Community Support

Hi @HenryJS ,

 

Would you please try the following calculated column, it will work:

Column =
IF (
    ISBLANK ( 'Table'[Combined Business Insurance Policy] )
        || 'Table'[Combined Business Insurance Policy] < TODAY (),
    "Insurance Missing",
    IF (
         (
            'Table'[Proffesional Indemnity Insurance Policy] < TODAY ()
                || ISBLANK ( 'Table'[Proffesional Indemnity Insurance Policy] )
        )
            && (
                'Table'[Public Liability Insurance] < TODAY ()
                    || ISBLANK ( 'Table'[Public Liability Insurance] )
            ),
        "Insurance Missing",
        BLANK ()
    )
)

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

 

 

v-deddai1-msft
Community Support
Community Support

Please try my edit formula above again.

@v-deddai1-msft it's not right, 

 

if combined insurance is there and greater today then insurance shouldn't be missing

 

if professional and public are there and greater today then insurance shouldnt be missing

 

 

Capture.PNG

v-deddai1-msft
Community Support
Community Support

Hi @HenryJS ,

 

Would you please try to use the following measure:

 

 

Column = SWITCH (
TRUE (),
ISBLANK ( 'Table'[Combined Business Insurance Policy] )
|| 'Table'[Combined Business Insurance Policy] < TODAY (), "Insurance Missing",
(
'Table'[Proffesional Indemnity Insurance Policy] < TODAY ()
|| ISBLANK ( 'Table'[Proffesional Indemnity Insurance Policy] )
)
&& (
'Table'[Public Liability Insurance] < TODAY ()
|| ISBLANK ( 'Table'[Public Liability Insurance] )
), "Insurance Missing",
BLANK ()
)

 

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

@v-deddai1-msft that doesn't work unforunately as the insurance fields are columns not measures

amitchandak
Super User
Super User

@HenryJS , Try like


Switch( True(),
isblank([Combined Business Insurance Policy]) || [Combined Business Insurance Policy] < today() , "Insurance Missing",
[Proffesional Indemnity Insurance Policy] < today() &&  [Public Liability Insurance] < today() ,"Insurance Missing",
blank())

@amitchandak not pulling through correctly

 

needs to be

IF [Combined Business Insurance Policy] is blank or less than today

 

Return "Insurance Missing"

 

OR

 

IF [Proffesional Indemnity Insurance Policy] AND [Public Liability Insurance] is blank or less than today

 

Return "Insurance Missing"

 

OR if 

 

Capture.PNG

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.