cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ahspowerbi Frequent Visitor
Frequent Visitor

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
Super User IV
Super User IV

Re: Conditinal Column Using DAX

ahspowerbi Frequent Visitor
Frequent Visitor

Re: Conditinal Column Using DAX

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
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors