cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Arnault_
Resolver II
Resolver II

Slicer / SUM of the selected value

Hi All,

 

I am trying to get the sum of different values based on the slicer selection. The tricky part is that the slicer's items that can be selected refer to different measures based on different columns.

Example:

Item 1 (in the slicer) = Measure 1 = Column A = '10'

Item 2 (in the slicer) = Measure 2 = Column B = '12'

Item 3 (in the slicer) = Measure 3 = Column C = '20'

 

The slicer offers the possibility to switch from a measure to another. A multiple selection is also possible. As you can see in the below chart a multiple selection was done and each item is displayed with the right value. The three colors representing the three items selected in the slicer.

 

Now what if I want to have the sum of the selected values. In the example above, it would be (10 + 12 + 20) = 42.

In the chart below, if we consider the chart is the center, the first column, I would like to be able to calculate the sum of (19 + 44 + 10 ) = 73. Do you think this would be possible? I could provide a sample file if the requirements are not clear enough, but any idea would be useful at this stage.

 

Just to add some background. The different values represent a lead time. Each item refers to a particular stage. It would be interesting to sum the values of the selected stages.

Thanks.

 

2021-03-12_16h22_12.png

1 ACCEPTED SOLUTION
Arnault_
Resolver II
Resolver II

I finally found the solution.

I  have created a virtual table with the list of items in the 1st column (selected values in the slicer) and the corresponding measures (one measure using SWITCH (TRUE) ) in the second column.

Then I used SUMX over the 2nd column to get the expected result.

View solution in original post

1 REPLY 1
Arnault_
Resolver II
Resolver II

I finally found the solution.

I  have created a virtual table with the list of items in the 1st column (selected values in the slicer) and the corresponding measures (one measure using SWITCH (TRUE) ) in the second column.

Then I used SUMX over the 2nd column to get the expected result.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors