Forum Discussion

SK87's avatar
SK87
Icon for Helper III rankHelper III
4 years ago
Solved

Relationship between two datasets through Measures (DAX)

Hi , Please help me on below problem: I have one data set in which brands and respective their respective search values are there. And I have another dataset in which I have done unpivoting and hav...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  SK87 ,

    Here are the steps you can follow:

    1. Create calculated table.

    Slicer_Date =
    DISTINCT('Table2'[Attributes])

    2. Create measure.

    Flag =
    var _select= SELECTEDVALUE('Slicer_Date'[Attributes])
    var _mindate=MINX(
        FILTER(ALL('Table2'),'Table2'[Attributes]=_select),
        [Values])
    return
    SWITCH(
        TRUE(),
        MAX('Table2'[Attributes])=_select&&MAX('Table2'[Values])>_mindate,1,
        MAX('Table2'[Attributes])<>_select&&MAX('Table2'[Values])>_mindate,1,0
        )

    3. Place [Flag]in Filters, set is=1, apply filter.

    4. Result:

    If you need pbix, please click here.

    If I have misunderstood your meaning, please provide your desired output and pbix without privacy information.

    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