Forum Discussion
Filtering postponed orders from a list
- 1 year ago
Hi Anonymous,
Thanks for posting your query in Microsoft fabric community forum.I’ve reproduced your scenario and created a step-by-step guide to filter postponed orders and visualize them as you described. Below is the solution using Power BI and DAX to meet your requirements.
You can use the following DAX measures in Power BI to achieve your goal:
- Count Orders Postponed Yesterday (March 19, 2025)
TotalPostponed = CALCULATE( COUNTROWS('Table'), 'Table'[Postponing Date] = DATE(2025, 3, 19) )- Identify Orders Postponed on the Delivery or New Delivery Date
Calculated Column:
IsPostponedOnDeliveryOrNew = IF( OR( 'Table'[Postponing Date] = 'Table'[Delivery Date], 'Table'[Postponing Date] = 'Table'[New Delivery Date] ), 1, 0 )- Measure to Count These Orders:
PostponedOnDeliveryOrNew = CALCULATE( SUM('Table'[IsPostponedOnDeliveryOrNew]), 'Table'[Postponing Date] = DATE(2025, 3, 19) )
I have attached the Power BI (.pbix) file and a sample screenshot for your reference. You can modify the file based on your dataset:
I trust this information proves useful. If it does, kindly “Accept it as a solution” and give it a 'Kudos' to help others locate it easily.
Thank you.
Anonymous Create a new measure to count the number of orders postponed yesterday.
Create another measure to count the number of orders postponed on the same delivery date or the new delivery date
DAX
PostponedYesterday =
VAR Yesterday = TODAY() - 1
RETURN
COUNTROWS(
FILTER(
'Table',
'Table'[Postponing date] = Yesterday
)
)
PostponedOnDeliveryDate =
VAR Yesterday = TODAY() - 1
RETURN
COUNTROWS(
FILTER(
'Table',
'Table'[Postponing date] = Yesterday &&
(
'Table'[Postponing date] = 'Table'[delivery date] ||
'Table'[Postponing date] = 'Table'[New Delivery date]
)
)
)
Create a visual (e.g., a card or a table) to display these measures.