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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Aguirre
Helper IV
Helper IV

Show measurement data, according to condition

Hello, I have created a measure to know the days that have passed from a date until today, so far so good.
My problem is that I want to put a conditional on it and I can't, I'll give you my measurement:

Day =

var startDate=MIN(F_contract[F.Send])
var endDate=TODAY()
return DATEDIFF(startDate,endDate,DAY)+0
 
and now I want, if the field F_contract[F.signed] of the same table is = Null, that it show me the days of the measure and if not, put "ok"
I've tried different ways but it won't let me.
I've tried different ways but it won't let me.
The fields F_contract[F.Send] and F_Contract[F.signed] belong to the same table
any ideas?
1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Aguirre in case this solves your question, please mark this as solution. Appreciate your Kudos:

 

 

Day =

var startDate=MIN(F_contract[F.Send])
var endDate=TODAY()
var _result = DATEDIFF(startDate,endDate,DAY)+0
RETURN
    IF(
        ISBLANK(SELECTEDVALUE(F_Contract[F.signed])) && _result > 8,
        _result,
        "ok"
    )

 

 

View solution in original post

6 REPLIES 6
SpartaBI
Community Champion
Community Champion

@Aguirre just to make sure, you tries this and it didn't work:

 

Day =

var startDate=MIN(F_contract[F.Send])
var endDate=TODAY()
var _result = DATEDIFF(startDate,endDate,DAY)+0
RETURN
    IF(ISBLANK(SELECTEDVALUE(F_Contract[F.signed])),_result, "ok")

 

well, excuse me.
I need it to show me only the days, when the value is fulfilled is F_Contract[F.signed]= Null and "_result" >8 days.

Something like that:
YES::
F_Contract[F.signed] && _result >8
Show the day else show OK

SpartaBI
Community Champion
Community Champion

@Aguirre in case this solves your question, please mark this as solution. Appreciate your Kudos:

 

 

Day =

var startDate=MIN(F_contract[F.Send])
var endDate=TODAY()
var _result = DATEDIFF(startDate,endDate,DAY)+0
RETURN
    IF(
        ISBLANK(SELECTEDVALUE(F_Contract[F.signed])) && _result > 8,
        _result,
        "ok"
    )

 

 

Perfect, it's what I needed, thank you very much.

The solution is perfect, but I am missing a detail, I want the result of the _result to be > 8 days and the Null condition is also met.
I have tried but it does not give me correct, can you help me

SpartaBI
Community Champion
Community Champion

Not sure I understand. Can you write in simple words what are the conditions that you want to be for what result. All the options

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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