Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count duplicates RANK in a matrix visual column without Power Query

Hi   I have a very simple visual matrix on a report page with as first column Article names (than can be filtered with a slicer) and a second colum with their Total sales. I made a third column wit...
  • SpartaBI's avatar
    SpartaBI
    4 years ago

    Anonymous Why next monday :))
    This is the formula:

     

    # Identical Rank = 
    VAR _tbl = 
        ADDCOLUMNS(
            ALLSELECTED('Table'[Article]),
            "@Rank", RANKX(ALLSELECTED('Table'[Article]), [# Total])
        )
    VAR _current_rank = [Rank]
    VAR _result = 
        COUNTROWS(
            FILTER(
                _tbl,
                [@Rank] = _current_rank
            )
        )
    RETURN
        _result

     


    And these are the other measure I created:

     

    # Total = SUM('Table'[Total])
    
    Rank = RANKX(ALLSELECTED('Table'[Article]), [# Total])

     

     





          

    Showcase Report – Contoso By SpartaBI