Forum Discussion

CarlsBerg999's avatar
CarlsBerg999
Icon for Helper V rankHelper V
5 years ago
Solved

Create a DAX relationship

Hi,   I have a situation where i have two tables: Category and Products. I want to combine these to a visual. However, this would require a relationship that links Product 1,2,3,4 to "Products" cat...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi CarlsBerg999 ,

     

    Based on your description, I create a measure as follows.

    test = 

    SUMX(FILTER(ALL('Products'),LEFT(MAX('Products'[Products]),3)=LEFT(SELECTEDVALUE('Categories'[Categories]),3)),[Price])

    Result:

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

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