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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Galvones
Regular Visitor

How to sum multiple values if selected by slicer

Dear Community,

 

I have 10 suppliers which are evaluated by 10 different categories, in a 0 to 1 scale, and I'm trying to add their evaluations in each category based on a multiple selection slicer, to show and compare that addition into a stacked column chart. It's given me a lot of trouble to try and figure out how to do it.

 

I managed to do it in a little scale using binary values in a table, and a measure which defines the sum for the values  (for example, "Capacity" = 1, "Cash" = 2, "Clean" = 4, "Commitment" = 8, ando so on), combining it with a Var and Switch functions, as follows:

image001.png

 

Example by selecting "Capacity" and "Clean" categories on the slicerExample by selecting "Capacity" and "Clean" categories on the slicer

 

It worked, in a way. But for all 10 categories, the final code had 1024 lines for the SWITCH function, and that is too much memory used for most computers in which I tried to do it.

My question is: Is there another way to do the same thing, but through other functions? Or can I do something like that in a way that needs less memory?

Thanks.

0 REPLIES 0

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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