Forum Discussion

sanjanarama's avatar
sanjanarama
Icon for Resolver I rankResolver I
4 years ago
Solved

measure value in a table

I have tables as below and created measures for each tables. first three tables belong to company M and next three with company IQ. I wanted to display the measure in stacked bar chart with...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi sanjanarama ,

     

    Please firstly create a new table with all table_names:

    Table = {"M-IDMismatch","M-NameMismatch","IQ-IDMismatch","IQ-NameMismatch"}

    And then use a measure to find the matched measure based on the name:

    Measure =
    SWITCH (
        MAX ( 'Table'[Value] ),
        "M-IDMismatch", [CountOfTableM-IDMismatche],
        "M-NameMismatch", [CountOfTableM-NameMismatch],
        "IQ-IDMismatch", [CountOfTableIQ-IDMismatch],
        "IQ-NameMismatch", [CountOfTableIQ-NameMismatch]
    )

    Output:

     

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