Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Filtering postponed orders from a list

Hi all,

I need help to the following task. the data is about order delivery Postponing. some orders are postponed several times (Postponing round). Some are postponed on the delivery date. I am trying to filter two things. first: how many orders positions were postponed yesterday. second: howmany of them were postponed on the same delivery date or the new delivery date?

 

At the end I should see a visual like this:

 

Thank you in Advance for your help.

 

 

 

 

order NumberOrder PositionPostponing roundPostponing datedelivery dateNew Delivery date
100110003.02.202513.02.202519.02.2025
100110107.02.202513.02.202525.02.2025
100110224.02.202513.02.202511.03.2025
100110327.02.202513.02.202520.03.2025
100110419.03.202513.02.202503.04.2025
100210006.01.202510.01.202528.01.2025
100210117.01.202510.01.202525.02.2025
100210219.02.202510.01.202514.03.2025
100210311.03.202510.01.202519.03.2025
100210419.03.202510.01.202521.03.2025
100310019.03.202528.04.202516.05.2025
100420013.02.202514.02.202505.03.2025
100420104.03.202514.02.202514.03.2025
100420213.03.202514.02.202520.03.2025
100420319.03.202514.02.202527.03.2025
100510019.03.202513.05.202502.06.2025
100530019.03.202513.05.202502.06.2025
100550019.03.202513.05.202502.06.2025
100661019.03.202501.04.202509.04.2025
100710003.03.202512.03.202520.03.2025
100710119.03.202512.03.202525.03.2025
100810019.03.202521.03.202531.03.2025
1009660019.03.202520.03.202507.04.2025
101020019.03.202520.03.202507.04.2025
101110019.03.202524.03.202528.03.2025
  • 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.

4 Replies

  • 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.

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    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's avatar
      Anonymous
      Not applicable

      Thank you very much for your help, and applogies for not replying quickly 😊.

       

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hi Anonymous,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.