Forum Discussion

mw123's avatar
mw123
Frequent Visitor
8 years ago

Summing values into one row for specific values selected in slicer

Hello everyone-

 

I have a report with a slicer and corresponding table. There are 3 potential options for the slicer. Say the options for the slicer are: 1, 2 and 3.  When slicer 1 and 2 are selected, I want to see the sum of both of them together on one line in my table. However, when slicer 1 and 3 are selected (or slicer 2 and 3), I want to see the results on separate lines. I only want the values to sum into 1 row when slicer 1 and 2 are selected. When all 3 slicers are selected, I want to see 2 rows, one row for the sum of slicer 1 and 2 and the other row for the sum of slicer 3.

 

The report is built so that the unique row is by date and slicer. So, if all three of the slicers are selected, the results will show something like the following (not what I want to see):

 

Slicer: 

 

select all                 1                            2                                3              

 

 

Date:                   field a:                   field b:                       field c:

1/1/2017             $100,000                $50,000                       $75,000

1/1/2017             $50,000                  $100,000                     $75,000 

1/1/2017             $75,000                  $50,000                       $100,000      

2/1/2017             $50,000                  $75,000                       $100,000    

2/1/2017             $100,000                $50,000                       $50,000 

2/1/2017             $75,000                  $75,000                       $50,000

 

What I want to see is this: (based on the previous example^. Please assume the first 2 rows for each date in the above example are slicers 1 and 2)

1/1/2017              $150,000              $150,000                        $150,000

1/1/2017              $75,000                $50,000                          $100,000

2/1/2017              $150,000              $125,000                        $150,000

2/1/2017              $75,000                $75,000                          $50,000

 

 

Does anyone know if there is a way to do this? Please let me know if additional detail is needed. 

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mw123,

     

    >>Does anyone know if there is a way to do this? Please let me know if additional detail is needed. 

    Current power bi don't support use slicer to control summary records.

    Maybe you can try to use programming language to achieve this requirement.

     

    Regards,

    Xiaoxin Sheng

    • mw123's avatar
      mw123
      Frequent Visitor

      Hi Anonymous,

       

      Thanks for getting back to me. Do you know how this could be done using a programming language within PowerBI? 

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI mw123,

         

        >>Do you know how this could be done using a programming language within PowerBI? 

        It is impossible to achieve these effect in power bi. You can use programming language to write a custom form with datagrid control and specific operations when you choose item.

         

        Regards,

        Xiaoxin Sheng