Forum Discussion

Krzysztof1's avatar
Krzysztof1
Regular Visitor
2 years ago

Hiding selective rows in matrix

Hi Colleagues

Colud you advise what measure should I apply to get the effect : hiding selective rows in matrix without affecting subtotals 
I am preparing the report and I want to show only 1 seleted category with values but also incl. in total and subototal
Thx
BR 
Chris

4 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Krzysztof1 

    if you are using a simple table you can use isfiltered function

    if you are using a matrix visual you can use isinscope function 

     

    these 2 functions can be used to control the calculation base on the where you are in a visual ( row level , total level , subtotal level) 

     

    hope this helps 

     

     

     

    • Krzysztof1's avatar
      Krzysztof1
      Regular Visitor

      Many thanks Daniel29195 but i am still don`t know how it should work. When I connect this function with SUM(...) this summirize only selected value but I wonder if there is possible to sum up all values as subtotal and total but show only one category

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Krzysztof1 ,

     

    Maybe you can try formula like below:

    Visible Sales = 
    IF (
        MAX(Sales[Category]) = "SelectedCategory",
        MAX(Sales[SalesAmount]),
        BLANK()
    )
    
    Total Sales = 
    SUMX (
        ALLSELECTED(Sales),
        Sales[SalesAmount]
    )
    

    Best Regards,
    Adamk Kong

     

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

    • Krzysztof1's avatar
      Krzysztof1
      Regular Visitor

      Many thanks 
      I am still looking for another soluition
      My problem is as follows

      I want to show only selectedCategory in Region1 and Region2 and hide theAnotherCategory but show also orignal Sum Of SelectedCategory and Sum of Region