The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
Needing some help on displaying the orders where the status has changed when compared to the previous day.
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.
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
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 ) ) )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
17 | |
12 |
User | Count |
---|---|
36 | |
34 | |
20 | |
19 | |
15 |