Forum Discussion

e2liu77's avatar
e2liu77
Icon for Helper I rankHelper I
5 years ago
Solved

2 Data in same visual with different filters applied

Hi all,
 
I have 2 measures, the first applies filter 1 but not filter 2. The other applies filter 2 not filter 1. 2 measurs have to be shown in the same visualization.
Column1 for filter 1, and column 2 is for filter 2.
 
Code looks like:
Result1 =
CALCULATE(
    [a measure 1],
    Table[column1] IN { multiple choices}
)
Result2 =
CALCULATE(
    [a measure 2],
    Table[column2] IN { multiple choices}
)
I need to place result 1 and result 2 in same visualization.
 
Column1 and Column2 has different column titles but same value set, let's say {C, H, M, L}.
 
I would like to create a new table CandidateValue with value {C, H, M, L}, and set it as visual slicer. I need to choose 2 of {C, H, M, L}, i.e. {C, H}

 

I try to create below code:
ChosenValue =
CONCATENATEX (
VALUES(CandidateValue [Value] ),[Value],",")
 
and replace the "multiple choices" in result 1 and result 2 with the "ChosenValue".
 
But it doesn't work. What's wrong?
  • Hi, e2liu77 

    Please correct me if I wrongly understood your question.

     

    Can you try the below measure?

     

    Result1 =
    CALCULATE(
        [a measure 1],
        Table[column1] IN allselected (CandidateValue [Value])
    )
     
     
    Result2 =
    CALCULATE(
        [a measure 2],
        Table[column2] IN allselected(CandidateValue [Value])
    )
     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.

4 Replies

  • Hi, e2liu77 

    Please correct me if I wrongly understood your question.

     

    Can you try the below measure?

     

    Result1 =
    CALCULATE(
        [a measure 1],
        Table[column1] IN allselected (CandidateValue [Value])
    )
     
     
    Result2 =
    CALCULATE(
        [a measure 2],
        Table[column2] IN allselected(CandidateValue [Value])
    )
     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.

    • e2liu77's avatar
      e2liu77
      Icon for Helper I rankHelper I

      Hi Jim,

       

      I have a further question on this topic.

       

      Now  I have result 1 based on measure 1/column1and result 2 based on measure 2/column2. I need to calculate result 3 = Result 1*result 2.

      Result 3 needs to be presented against candidatevalue group. Is it possible?