Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to use ConcatenateX values in Filtering Column data

Hi

I want to filter table by using multiple selection list.

Test_Measure =
        var selected_values = CONCATENATEX(VALUES(Sample_Data[Column_1]),[Column_1],",")
        return
           CALCULATE(SUMX(Filter(Sample_Data_1,[Column_1] in {selected_values}), [Total]))
 
I have a Slicer with values from sample_data Column_1 and I want to get selected multiple values and then Filter accordingly into another table  sample_data_1 column_1
Both tables are not related to each other.
 
Please reply with solution
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

    I have found a similar post, please refer to it to see if it helps you.

    Filter table based on slicer with multiselect for a column with combinations 

    Solutions:

    Use the following dax to create new column:

    first = LEFT(Data[Combination],1)
    second = MID(Data[Combination],3,1)
    third = RIGHT(Data[Combination])

    Then base on the base table ,create another table:

    Table = 
    UNION (
        SELECTCOLUMNS (
            Data,
            "Drop Down", Data[first],
            "Combination", Data[Combination],
            "value", Data[Value]
        ),
        SELECTCOLUMNS (
            Data,
            "Drop Down", Data[second],
            "Combination", Data[Combination],
            "value", Data[Value]
        ),
        SELECTCOLUMNS (
            Data,
            "Drop Down", Data[third],
            "Combination", Data[Combination],
            "value", Data[Value]
        )
    )

    If I have misunderstood your menaing, please provide your pbix file without privacy information and desired output with more details.


    Best Regards
    Community Support Team _ Polly

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I have found a similar post, please refer to it to see if it helps you.

    Filter table based on slicer with multiselect for a column with combinations 

    Solutions:

    Use the following dax to create new column:

    first = LEFT(Data[Combination],1)
    second = MID(Data[Combination],3,1)
    third = RIGHT(Data[Combination])

    Then base on the base table ,create another table:

    Table = 
    UNION (
        SELECTCOLUMNS (
            Data,
            "Drop Down", Data[first],
            "Combination", Data[Combination],
            "value", Data[Value]
        ),
        SELECTCOLUMNS (
            Data,
            "Drop Down", Data[second],
            "Combination", Data[Combination],
            "value", Data[Value]
        ),
        SELECTCOLUMNS (
            Data,
            "Drop Down", Data[third],
            "Combination", Data[Combination],
            "value", Data[Value]
        )
    )

    If I have misunderstood your menaing, please provide your pbix file without privacy information and desired output with more details.


    Best Regards
    Community Support Team _ Polly

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