Forum Discussion

vetty's avatar
vetty
Frequent Visitor
3 years ago

Show Column with values from different measures

Hi all,

I have a set of measures calculated on different tables. 

Based on two slicers I display the measure in a visual table, as follows:

 

this result was obtained using a Dax formula with a switch on the different measures:

Production (tons) = SWITCH(
    TRUE(),
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="Oxo",[OXO_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="Detal",[DET_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="Pacol_5",[P5_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="Pacol_2",[P2_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="HF",[HF_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="Isosiv",[ISO_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="FRAZALC",[CRI_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="Selas",[SEL_PRODUCTION],
    SELECTEDVALUE('Unit-Overview'[Unit-Name])="C951",[C951_PRODUCTION],
    "N/A"
)
 
The filter on Date is made by relations that each table has with a calendar table.
What I want to get is also when I select multiple units, I want to show a row for each selected unit
 
Thanks for any suggestions or ideas.

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  vetty ,

     

    Do you mean that the selected target is automatically displayed when two fields are the same field or when there is a relationship between two fields

    If it is not a different field, you can use the IF() function to mark it, set the eligible to 1, the non-qualified to 0, and finally put it in the Filter to set is=1 to display

    If it does not meet your expectations, can you express the results you want in the form of pictures, we can help you better.

     

    Best Regards,

    Liu Yang

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

  • vetty's avatar
    vetty
    Frequent Visitor

    Hi Anonymous 

    Thanks for the response but I think it does not fit my request.

    I try to explain it better:

    My data model is something like follows:

    In TAB A I've several columns one of which is the unit_name (a static string for all rows e.g. "Unit A"), and a measure [UNIT_A_PRODUCTION] calculated also using fields from TAB A1 and TAB A2.

    In the same way,

    In TAB B I've several columns one of which is the unit_name (a static string for all rows e.g. "Unit B"), and a measure [UNIT_B_PRODUCTION] calculated also using fields from TAB B1 and TAB B2.

     

    What I want to get in output is the table visual below:

    UNITPRODUCTION
    Unit AProduction unit A
    Unit BProduction unit B
     
     

    Furthermore, consider that in each TAB A and TAB B, I've also a UNIT_A_STOCKS and UNIT_B_STOCKS measures, I would also show a visual like follows:

    Hoping now is a little bit more clear.
     
    Thanks for your help.