Forum Discussion

Petanek333's avatar
Petanek333
Icon for Helper III rankHelper III
3 years ago

Variable values in a measure

Hi,

I would like to use a something like a variable measure based on values I select. 

I have 4 tables (Alpha, Bravo, Charlie, Delta) like this: 

each containing stock number of certain product and its sales.

Combined in a table like this:

Last column is a measure dividing all inventories (Inventory of Alpha, Bravo, Charlie and Delta) by all sales. But I would like to be able to select which of the inventories are going to be divided by which of the sales. 

In the example above I would like the Dividing measure to show a value calculated like (Alpha Inv + Charlie Inv) / (Bravo Sales + Charlie Sales + Delta Sales)

I don't want to use Filed parameters with predefined combinations since in my model there are many categories like Alpha, Bravo etc.

In an ideal scenario I would like the table to always show all of the inventory and sales categories (columns) but just the measure would be calculated based of a selection of inventory and sales groups.

 

Here is the sample file: File 

 

Any help would be greatly appreciated. 

2 Replies

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

    Hi Petanek333 

    Your 2 tables for your 2 slicers are not joined to any!!!

    Therefore no reaction to your Matrix would occure

    Sorry but your Model is not good either.

    • Petanek333's avatar
      Petanek333
      Icon for Helper III rankHelper III

      Hi aj1973 ,

      the model is just a simplified sample used to describe what I want want to achieve.

      And I created those two tables for slicers just to demonstrate that I want to be able to select measures involved in a desired calculation.