Forum Discussion

tjarnigan's avatar
tjarnigan
Frequent Visitor
9 years ago
Solved

Writing a measure between 4 different tables

I am relatively new to Power BI and the DAX language. Here is my issue:   Table (relevant columns to form relationships):   Cube (BoxSize (Varchar), Box Size Numeric (Decimal) Inventory (BoxSize...
  • MattAllington's avatar
    MattAllington
    9 years ago

    sorry about before.    I had to run and didn't want to give you another wrong answer, so I needed to test.  This should work

     

    =sumx(size,CALCULATE(sum(Orders[Qty])) * size[Size])

     

    edit:  Sorry, this next one is better  and what I had in mind originally

    =sumx(Orders,Orders[Qty] * RELATED(size[Size]))

     

    Just rename the columns you need

     

    Best to avoid calc columns if you can. It's not wrong, just better http://exceleratorbi.com.au/calculated-columns-vs-measures-dax/

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi tjarnigan,

     

    Does MattAllington's solution help with your requirement?

     

    Regards,

    Xiaoxin Sheng