Forum Discussion

GuillaumeBD's avatar
GuillaumeBD
Frequent Visitor
2 years ago

Cross filter with text values

Hello I want to cross filter with text values. I can't find the right formula. I have a simple data model which has REF as the common key.  I want to be able to put information from tables 4 and 5 in the same visual (Date de réception (4) and matricule (5)). The best I've been able to come with with is concatenatex but I don't want to concatenate, I want unique values. See below. Thank you

 

 

Measure

Crossfilter =
CALCULATE(CONCATENATEX('4_MIR_Items','4_MIR_Items'[Matricule],","),CROSSFILTER('4_MIR_Items'[BC],'3_DA_Items'[Ref],both))

 

Model

 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi GuillaumeBD ,

     

    According to your statement, I think you use CONCATENATEX() in your code, so Power BI will return concatenate result. If you don't want concatenate result , I think you can try MAXX() function.

    Crossfilter =
    CALCULATE (
        MAXX ( '4_MIR_Items', '4_MIR_Items'[Matricule] ),
        CROSSFILTER ( '4_MIR_Items'[BC], '3_DA_Items'[Ref], BOTH )
    )

     

    Best Regards,
    Rico Zhou

     

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