Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Can I create a measure with components from two table fields?

I have two table fields - A & B.

In Field table A, I have total category of fruit (apple, banana, etc), monthly sales in $, month names.

In Field table B, I have total category of fruit again, monthly unit sales, month names.

Both table looks like this:

 

So I created a chart. X Axis is "Month", big filter is "Fruit", first Y is "Sales $" and second Y is "Unit". Some how the sales $ line looks normal with ups and downs but the unit line is flat with only one same number across all months. Something like below:

 

Anyone knows how to fix it? Somehow I think the relationship may do but still, I can't get it right.

 

Thanks!

 

  • You have 2 good options and maybe some more bad options so we'll go with the 2:
    1. Create dimension tables - specifically a date / custom date with only months and connect it to both tables. than use the months from the dimensions.
    2. In case both tables have the same granulrity and the only differenct is the type of the 3 column (sales vs qty) just join them before you load it to the model 🙂  

1 Reply

  • SpartaBI's avatar
    SpartaBI
    Icon for Community Champion rankCommunity Champion

    You have 2 good options and maybe some more bad options so we'll go with the 2:
    1. Create dimension tables - specifically a date / custom date with only months and connect it to both tables. than use the months from the dimensions.
    2. In case both tables have the same granulrity and the only differenct is the type of the 3 column (sales vs qty) just join them before you load it to the model 🙂