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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.