Forum Discussion

oshello's avatar
oshello
Frequent Visitor
3 years ago
Solved

Matrix Row Custom Grouping

Hi,   I have a problem where I'm trying to customize the order of grouping of the rows in a matrix visual without reversing the labels. It's a bit hard to explain so I have an example.     ...
  • Ritaf1983's avatar
    Ritaf1983
    3 years ago

    Hi oshello 
    Yes,you can try  create calculated column like :

    RelatedCompany =
    VAR CurrentCode = 'Input (2)'[Code]
    VAR CurrentCompany = 'Input (2)'[Company]
    RETURN
        IF(CurrentCompany = "TREASURY",
            CALCULATE(
                MAX('Input (2)'[Company]),
                FILTER(
                    'Input (2)',
                    'Input (2)'[Code] = CurrentCode &&
                    'Input (2)'[Company] <> "TREASURY"
                )
            ),
            CurrentCompany
        )


    I updated the sample file as well.

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