Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Arnault_
Resolver III
Resolver III

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 III
Resolver III

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 III
Resolver III

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.