Forum Discussion

MichelleTW729's avatar
1 year ago
Solved

TopN +Others use toolhint

I have report do martix table with drill down ,

i want use tooltip to show red frame data .

when mouse move to left table , can tell the how many cases of  dimension "serverity" 

use topN+others . 

 

4 Replies

  • Hi, 

    I tried to create a sample pbix file like below, and please check the below picture and the attached pbix file.

    I tried to use WINDOW DAX function to generate TOPN values.

     

    WINDOW function (DAX) - DAX | Microsoft Learn

     

     

     

     

    WINDOW function (DAX) - DAX | Microsoft Learn

     

    Case Top N: = 
    VAR _topN = 'TopN'[TopN Value]
    VAR _t =
        WINDOW (
            1,
            ABS,
            _topN,
            ABS,
            ALL ( serverity[serverity], serverity[sort] ),
            ORDERBY ( [Case:], DESC )
        )
    VAR _others =
        CALCULATE ( [Case:], ALL ( serverity[serverity], serverity[sort] ) )
            - CALCULATE ( [Case:], _t )
    RETURN
        SWITCH (
            TRUE (),
            SELECTEDVALUE ( serverity[serverity] ) = "Others", _others,
            HASONEVALUE ( serverity[serverity] ), CALCULATE ( [Case:], KEEPFILTERS ( _t ) ),
            [Case:]
        )

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MichelleTW729 ,

    Thank you for the helpful response Jihwan_Kim !
    The provided information is accurate and address your issue. I just wanted to kindly follow up to see if you had a chance to review the previous response provided by Jiwan. I hope it was helpful. If yes, please Accept the answer so that it will be helpful to others to find it quickly.If you have any further questions, feel free to reachout!

    Thank you.

    Regards,
    Pallavi.