Forum Discussion

ianallen13D's avatar
ianallen13D
Frequent Visitor
2 years ago
Solved

Top 5 & Bottom 5 both in Matrix Visual

Hello,    I have a matrix visual that is basically showing the following:  Fields are:  Status - basically parent category to Task (i.e. Advance, Develop, etc.) Task - the name of the task what ...
  • Uzi2019's avatar
    2 years ago

    Hi   

    Modify dax as per you need.

    Top Bottom = 
    VAR __Products = 
    FILTER ( 
        ADDCOLUMNS ( 
            SUMMARIZE ( 
                ALLSELECTED ( Products[Product] ), 
                Products[Product] 
            ), 
            "@Sale", [Sales] 
        ), 
        NOT ISBLANK ( [@Sale] ) 
    )  
    RETURN
    CALCULATE ( 
        [Sales],
        KEEPFILTERS ( 
            UNION (
                TOPN ( 5, __Products, [@Sale], ASC ),
                TOPN ( 5, __Products, [@Sale] )
            )
        )
    )

     

     

    Or refer below videos
    https://www.youtube.com/watch?v=mdj2ilk4rGc

     

     

    I hope I answered your question!