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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ajitsahoo8338
Helper III
Helper III

Need help with this logic

Hello Everyone, I am trying to create logic but failed to do. 
I need to create a Status Column. In which there should be rows/options i.e "On-Time", "Late", "Released"
"On-Time"= 

NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
    [Release Date] <= [Baseline_EndDate], "On-Time"
"Late"=
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
    [Release Date] > [Baseline_EndDate] ||
    ISBLANK(Project_v2_w_LW_PPC[Release Date]) && [Baseline_EndDate] < TODAY(), "Late"
"Released"= 
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
    [Release Date] <= [Baseline_EndDate || 
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
    [Release Date] > [Baseline_EndDate]

(Basically, if any row has a Release Date Then It will be considered as Released)

 

The issue is with the Released logic because of overlapping conditions with On-Time and Late. How to write this codition correctly?

Thank You,
Ajit

19 REPLIES 19
Kedar_Pande
Super User
Super User

@ajitsahoo8338 You can try:

Status = 
SWITCH(
TRUE(),
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])), "Released",
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) && Project_v2_w_LW_PPC[Release Date] <= Project_v2_w_LW_PPC[Baseline_EndDate], "On-Time",
(
ISBLANK(Project_v2_w_LW_PPC[Release Date]) && Project_v2_w_LW_PPC[Baseline_EndDate] < TODAY()
) ||
(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) && Project_v2_w_LW_PPC[Release Date] > Project_v2_w_LW_PPC[Baseline_EndDate]
), "Late",

BLANK()
)

This structure ensures each row fits into exactly one category without overlap.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Hello @Kedar_Pande This is not working

ajitsahoo8338
Helper III
Helper III

Hello @Bibiano_Geraldo and @Uzi2019  

My data looks like this. I want to create a visual table like this and add a status slicer. From that slicer, If I select On-Time then it should show On-Time rows and For Late selection it should show Late and For Released Selection, it should show those rows which have a release date

ajitsahoo8338_0-1729076449705.png

 

Uzi2019
Super User
Super User

HI @ajitsahoo8338 

 

Can you share the sample data with expected output??

 

It would be better working with data instead of just a logic.

 

you can share the simple excel file screenshot for better understanding.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hello @Uzi2019 

My data looks like this. I want to create a visual table like this and add a status slicer. From that slicer, If I select On-Time then it should show On-Time rows and For Late selection it should show Late and For Released Selection, it should show those rows which have a release date.

ajitsahoo8338_1-1729076765067.png

 

Hi,
Based on your table, you need to create two calculated columns and you will have to add two slicers to your report:

Column for released status:
ReleasedStatus =
IF(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])),
"Released",
BLANK()
)


Column for On time and Late Status:

 

OnTimeOrLate =
IF(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
Project_v2_w_LW_PPC[Release Date] <= Project_v2_w_LW_PPC[Baseline_EndDate],
"On-Time",
IF(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
Project_v2_w_LW_PPC[Release Date] > Project_v2_w_LW_PPC[Baseline_EndDate],
"Late",
IF(
ISBLANK(Project_v2_w_LW_PPC[Release Date]),
"Open",
BLANK()
)
)
)

Hi @ajitsahoo8338 

 

Can you add one more staus column of Late/Release/On time. next to your table.???

so that will create logic accordingly..

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

ajitsahoo8338_0-1729076280288.png

My data looks like this. I want to create a visual table like this and add a status slicer. From that slicer, If I select On-Time then it should show On-Time rows and For Late selection it should show Late and For Released Selection, it should show those rows which have a release date

 

Project NumberActivity NumberTask NameResourceBaseline EndDateRelease Date
2263000Long Lead ReleaseMECHANICAL8/16/2024 0:008/16/2024 0:00
2273000Long Lead ReleaseMECHANICAL8/16/2024 0:008/16/2024 0:00
1003000Manuals CompleteTECH6/18/2024 0:006/18/2024 0:00
2273001GA Tasks/Initial BOMMECHANICAL9/13/2024 0:009/20/2024 0:00
2253002GA Initial BOM ReleaseMECHANICAL7/29/2024 0:008/16/2024 0:00
2263002 BOM ReleaseMECHANICAL9/13/2024 0:00 
2203002Initial BOMMECHANICAL2/29/2024 0:003/29/2024 0:00
723002l Comp Long LeadMECHANICAL5/31/2024 0:005/10/2024 0:00
1313002Paint SchemeMECHANICAL6/21/2024 0:005/2/2024 0:00
1313003Stop KitELECTRICAL5/31/2024 0:005/31/2024 0:00
2253003MA GroupMECHANICAL9/17/2024 0:00 
1323004Power RevisionELECTRICAL7/29/2024 0:007/30/2024 0:00

My data looks like this. I want to create a visual table like this and add a status slicer. From that slicer, If I select On-Time then it should show On-Time rows and For Late selection it should show Late and For Released Selection, it should show those rows which have a release date

ajitsahoo8338
Helper III
Helper III

Hello @Bibiano_Geraldo  Thank you for your response. After using your DAX I am only getting On-Time and Late. 

ajitsahoo8338_0-1729074730360.png

 

Could you please share a sample of your table? Please dont share sensitive data.

Note:
The released status will only appear if all other status are not satisfied.

Hello @Bibiano_Geraldo 

My data looks like this. I want to create a visual table like this and add a status slicer. From that slicer, If I select On-Time then it should show On-Time rows and For Late selection,it should show Late and For Released Selection, it should show those rows which have a release date

ajitsahoo8338_0-1729076703939.png

 

 

Hello @Bibiano_Geraldo and @Uzi2019 My data looks like this. I want to create a visual table like this and add a status slicer. From that slicer, If I select On-Time then it should show On-Time rows and For Late selection it should show Late and For Released Selection, it should show those rows which have a release date.

ajitsahoo8338_0-1729076337215.png

 

Hi @ajitsahoo8338 

Please write status in front of that table. like this

Uzi2019_0-1729148795994.png

 

so will implement the logic accordingly.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hello @Uzi2019 

In The Slicer, There should be there option to select. Released, on time and Late. If I select Released then it should show all On-Time rows and Late Rows which have a Release Date. For On-Time Selection, it should show all on-time rows and for late selection, it should show all late rows.

ajitsahoo8338_1-1729155641617.png

 

Hello @Uzi2019 

In The Slicer, There should be three option to select. Released, on time and Late. If I select Released then it should show all On-Time rows and Late Rows which have a Release Date. For On-Time Selection, it should show all on-time rows and for late selection, it should show all late rows.

ajitsahoo8338_1-1729155641617.png

 

Bibiano_Geraldo
Super User
Super User

Hi,

Try the following DAX:

If this answer help you, please make it as solution.

Status =
IF(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
Project_v2_w_LW_PPC[Release Date] <= Project_v2_w_LW_PPC[Baseline_EndDate],
"On-Time",
IF(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])) &&
Project_v2_w_LW_PPC[Release Date] > Project_v2_w_LW_PPC[Baseline_EndDate],
"Late",
IF(
ISBLANK(Project_v2_w_LW_PPC[Release Date]) &&
Project_v2_w_LW_PPC[Baseline_EndDate] < TODAY(),
"Late",
IF(
NOT(ISBLANK(Project_v2_w_LW_PPC[Release Date])),
"Released",
BLANK()
)
)
)
)

Hello @Bibiano_Geraldo  Thank you for your response. After using your DAX I am only getting On-Time and Late. 

ajitsahoo8338_0-1729074916214.png

 

Hello @Bibiano_Geraldo  After using you DAX. I am only geting Late and On-Time not Released.

ajitsahoo8338_0-1729074841295.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors