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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Euro0681
Helper II
Helper II

Status Tracking

Hi All,
Needing some help on displaying the orders where the status has changed when compared to the previous day.

Euro0681_0-1684766323107.png

Table on the left showing 2 Order ID's and the table on the right only returns the order where the status has changed when compared to "Todays DT" Column.

Essentially Order ID '123' was in progress and expected to be delivered on the 20th, "Todays DT" Column is just tracking the order everyday hence making an entry everyday. But when the 20th of May came we can see the order was not delivered and had been pushed back a couple of days making it "Late" and is displayed in the table on the right.

How could I replicate this using a DAX? Either measure/column is fine just hitting a roadblock. 

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Euro0681 

Why not just filter for "Late" status?

So what I'm getting at is using the MAX(Today's DT) and compare each order with previous Today's Date < MAX(Todays DT) and check to see if anything on the order has changed (Status in this example).
Hope this image clears it up

Euro0681_0-1684778795632.png

 

@Euro0681 

Place the following measure in the filter pane of the table visual, select "is not blank" and apply the filter. 
FilterMeasure =
VAR T1 =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Order ID] ) )
VAR T2 =
DISTINCT (
SELECTCOLUMNS (
T1,
"@Status", 'Table'[Status],
"@Expected", 'Table'[Expected DT]
)
)
VAR T3 =
SELECTCOLUMNS (
TOPN ( 1, T1, 'Table'[Tody's DT] ),
"@Status", 'Table'[Status],
"@Expected", 'Table'[Expected DT]
)
VAR T4 =
SELECTCOLUMNS (
'Table',
"@Status", 'Table'[Status],
"@Expected", 'Table'[Expected DT]
)
RETURN
IF ( COUNTROWS ( T2 ) > 1, COUNTROWS ( INTERSECT ( T3, T4 ) ) )

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.