Forum Discussion

sydney20's avatar
sydney20
New Member
4 years ago
Solved

Matrix Table - keeps on repeating

Hi! Would appreciate insights on where my model is going wrong. I have these tables: (1) Base headcount of employees w/c I am planning to use as dimension (2) Data that would be used for the measu...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi sydney20 ,

     

    I suggest you to try if function to remove the repeating. My Sample is as below.

    Data (2):

    Employee (1):

    Business (3):

    Relationship:

    When I use measure+0 , I will get the same result like yours. The visual will keep repeating for all employee and business units.

    Try this code.

    Measure = 
    VAR _COMBINE = COMBINEVALUES("-",MAX(Employee[Employee]),MAX('Business Unit'[Business Unit]))
    VAR _LIST = SELECTCOLUMNS(Employee,"COMBINELIST",COMBINEVALUES("-",Employee[Employee],Employee[Business Unit]))
    VAR _RESULT = CALCULATE(SUM('Table'[Value])+0,VALUES(Employee[Employee]))
    RETURN
    IF(_COMBINE IN _LIST, _RESULT, BLANK())

    Result is as below.

     

    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.