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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Akshay_echo1995
Regular Visitor

Conditional Formatting not executting completely.

Hi Everyone,

 

We have 2 columns one with user name and on other we have the login date when they have last logged in, when we are trying to do conditional formatting to check whether they are login whithin time time or not.

We are trying to achive RAG (Red Amber Green ) status on column so that we can check who is not login within time.

If they are filling the timesheet within 7 days then it should be Green , withinn 14 days , Amber , rest should be in Red.

We are using below DAX to achive the same but its only executing the 1st condition not rest , Please help ,

 

DRV2 = IF(SELECTEDVALUE('DW Celoxis_TimeEntries'[data']][0]]['workItem_data_plannedStart]) - 7 , "Green",
IF(SELECTEDVALUE('DW Celoxis_TimeEntries'[data']][0]]['workItem_data_plannedStart]) -7 , "Amber" , "Red"
))
Akshay_echo1995_0-1709018667669.png

 

 
Thanks
Akshay 
5 REPLIES 5
PijushRoy
Super User
Super User

Hi @Akshay_echo1995 

Please try below DAX

 

DRV2 =
IF (
   ( SELECTEDVALUE ( 'DW Celoxis_TimeEntries'[data']][0]]['workItem_data_plannedStart] ) - Today()) <= 7,
    "Green",
    IF (
       ( SELECTEDVALUE ( 'DW Celoxis_TimeEntries'[data']][0]]['workItem_data_plannedStart] ) - Today())<= 14,
        "Amber",
        "Red"
    )
)

 

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Aleady tried this but only getting Green , its not getting executed for Amber and Red.

Hi @Akshay_echo1995 

Hope this column in Date format 

'DW Celoxis_TimeEntries'[data']][0]]['workItem_data_plannedStart]

You are calculating measure and using the measure in Field value of the conditional formatting

Please create a sample PBIX and share the google drive link


 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Hi,

I have shared the link with the pbix file , Please go through it and help me in achieving the RAG status as this is only picking up Green.

Its only picking first condition,

https://drive.google.com/file/d/1nW7kN_VPkArXDXR334thKfzagS12rQ9I/view?usp=sharing

Anonymous
Not applicable

Hi @Akshay_echo1995 ,

Permission needs to be requested to access the file, please make it public and be careful that the file does not contain private information, thank you.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.