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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Conditinal Column Using DAX

Hi Community, 

 

I have a data model that has multiple Dispatch ID's. The table populates with statuses for the IDs and when a new status is entered, it does not overide the previous one:

 

Dispatch ID | Status Code | dispatch timestamp  | Last Modified           |  Touched Flagged 

2341              20                 9/1/2019 15:00:00        9/3/2019 14:01:00

2341              12                 9/1/2019 15:00:00        9/4/2019 11:08:00

2121              13                 9/3/2019 18:00:00        9/4/2019 1:01:00

2341              10                 9/1/2019 12:00:00        9/5/2019 10:01:00       

1124              13                 9/8/2019 15:00:00        9/3/2019 14:01:00

2121              12                 9/3/2019 15:00:00        9/5/2019 14:00:00

 

I am wanting to create a flagged column to give me a flag if the Status happen within a certain amount of time. The condition is:

Id Dispatch ID has Status of 10 or 20 within 5 hours (last modified - dispatch timestamp), then flagged column should read "Touched"). This flag should reman as a flag for that ID regardless of the current status after it has met this condition.

2 REPLIES 2
Anonymous
Not applicable

Hi, 

I am now wanting to sum any values, rather create a conditional flag based on earliest (or current) row.
As I start the IF Statement with Earliest I am unable to add the column value. Any help?

 

I have attached the test .pbix I am using to determine the appropriate DAX. Can you please take a look and assist?

https://ahso365-my.sharepoint.com/:f:/g/personal/denisha_malone_ahs_com/EkA3jy-oMMtBsrEK2guyMGEBQ0O7...

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.