Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a data set of orders. An order can be one of a few status.
It starts out in Draft.
It moves to either InProgress or rejected.
It can then move to appealed.
I need to display one row for each order, along with the most recent status. I have the created date of each row.
The below screenshot shows the data, and ther is a link to a powerbi pbix with the data loaded.
Id appreciate some expertise in figuring this out as im unsure where to start.
Thank you for any expertise provided.
https://1drv.ms/u/s!AgldA0VQfPV9hNFJRlvQ2Y_4EXQggg
Solved! Go to Solution.
That looks like a form of Slowly Changing Dimension. Normally the current row would be marked with a column (and that usually comes from your source system)
If you don't have that mark from the source system, add a column like this
Column = VAR _maxDate = CALCULATE(MAX(FactTable[createdDate]), FILTER(FactTable, FactTable[orderid] = EARLIER(FactTable[OrderID]))) RETURN IF (FactTable[createdDate] = _maxDate, "Y")
Please test this, as I have just looked at it quickly.
Once you have this column, you can filter your table to return only rows where Column = "Y"
That looks like a form of Slowly Changing Dimension. Normally the current row would be marked with a column (and that usually comes from your source system)
If you don't have that mark from the source system, add a column like this
Column = VAR _maxDate = CALCULATE(MAX(FactTable[createdDate]), FILTER(FactTable, FactTable[orderid] = EARLIER(FactTable[OrderID]))) RETURN IF (FactTable[createdDate] = _maxDate, "Y")
Please test this, as I have just looked at it quickly.
Once you have this column, you can filter your table to return only rows where Column = "Y"
Thank you @HotChilli, this has worked. I never even considered looking at it like a slowly changing dimension.
Thank you for your expertise on this.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |