Forum Discussion

reemadsouza's avatar
reemadsouza
Frequent Visitor
1 year ago
Solved

Help with measure

I am trying to calculate the volume/Sales at plant level. Example below , so the total volume sold for AM Sports Depot reppeats in each line for sales plant column

 the example above uses this formula listed below:-

Sales Plant =
CALCULATE(
    SUM(STG_INVENTORY_PROGRESSION[Volume Sold]),
    ALLEXCEPT(
        STG_INVENTORY_PROGRESSION,
        STG_INVENTORY_PROGRESSION[COMPANY_NAME],
        STG_INVENTORY_PROGRESSION[REGION_NAME],
        STG_INVENTORY_PROGRESSION[PLANT],STG_INVENTORY_PROGRESSION[YEAR_MONTH]
    )
)

 

 

I am Trying to create a measure which would give similar results. the new formula I am trying to recreate is given below:-

 

here geography name in the above formula  = Plant in the below

 

Sales Plant =
CALCULATE(
[Ticket Volume Delivered Qty],
ALLEXCEPT('1 - Company', '1 - Company'[Company Name]),
ALLEXCEPT('3 - Geography', '3 - Geography'[Geography Region Name], '3 - Geography'[Geography Name]),
ALLEXCEPT('Date', 'Date'[Year/Month Name Short])
)

 

but the results I am getting with the second formula are as below.

 

I want the value 722897.68 for Sales plant for AM sports depot to repeat down like how it is in the above image.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi reemadsouza 

     

    Thanks for the additions, I can now fully understand what you are trying to do.
    But since your second measure uses a DAX formula that involves multiple tables, and we don't know what your structure of those tables and the relationships between them are, it's hard for us to find the cause of the problem and then advise you.

    Try constructing a new Matrix visual using the fields in the second DAX formula('1 - Company'[Company Name], '3 - Geography'[Geography Name]), then put that measure into the Values of the Matrix visual and see if that works.

    If not works, please provide some dummy data that maintains the same data structure and tell us the relationship between the tables.

     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi reemadsouza 

     

    May I ask what the problem you are experiencing is? It doesn't seem to be mentioned in your case description.

    Please describe the problem you are experiencing and what you expect the results to be. Please provide some dummy sample data if possible.

     

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    How to provide sample data in the Power BI Forum - Microsoft Fabric Community

     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • reemadsouza's avatar
      reemadsouza
      Frequent Visitor

      hi Anonymous 

       

      I aplogize my post was not that clear. I ahve edited original post to add my query at the end.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi reemadsouza 

         

        Thanks for the additions, I can now fully understand what you are trying to do.
        But since your second measure uses a DAX formula that involves multiple tables, and we don't know what your structure of those tables and the relationships between them are, it's hard for us to find the cause of the problem and then advise you.

        Try constructing a new Matrix visual using the fields in the second DAX formula('1 - Company'[Company Name], '3 - Geography'[Geography Name]), then put that measure into the Values of the Matrix visual and see if that works.

        If not works, please provide some dummy data that maintains the same data structure and tell us the relationship between the tables.

         

        Best Regards,
        Jarvis Tang
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.