March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I've implemented a "measure slicer" that works well: using the slicer, I can select one mesure.
I have a table with the values "filter1", "filter2", "filter3" that I use in a slicer.
And I use the following measure (simplified):
Graph: Slicer Cumul annuel =
IF(HASONEFILTER('KPI: Slicer'[Type]),
SWITCH(SELECTEDVALUE('KPI: Slicer'[Type]),
"filter1", [KPI1],
"filter2", [KPI2],
"filter3", [KPI3],
),
BLANK()
)
==> Now, i'd like to be able to select multiple values in the slicer, and it would sum all selected mesures.
Thank you,
Solved! Go to Solution.
@Ncio , try like
Graph: Slicer Cumul annuel =
calculate(
if(countx(filter('KPI: Slicer'[Type] , 'KPI: Slicer'[Type] = "filter1"),'KPI: Slicer'[Type] )+0 > 0, [KPI1],0)+
if(countx(filter('KPI: Slicer'[Type] , 'KPI: Slicer'[Type] = "filter2"),'KPI: Slicer'[Type] )+0 > 0, [KPI2],0)+
if(countx(filter('KPI: Slicer'[Type] , 'KPI: Slicer'[Type] = "filter3"),'KPI: Slicer'[Type] )+0 > 0, [KPI3],0)
)
Hi, @Ncio
Please check the below picture and the sample pbix file's link down below.
The left side chart is the single selection, and the right side chart is the multi-selection (Sum).
Once you multi-select the slicer, the left chart will go back to the default, and the right chart will sum the selected measures.
All measures are in the sample pbix file.
https://www.dropbox.com/s/n1hwfr92e4ib8v9/diffaaa.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Assuming that all your measures return numbers you should be able to do something like
New Measure = sumx(values('measure slicer'[measure]),[Slicer Cumul annel])
This pattern might not perform very well as you add more visuals, measures or data to the report but should work.
@Ncio , try like
Graph: Slicer Cumul annuel =
calculate(
if(countx(filter('KPI: Slicer'[Type] , 'KPI: Slicer'[Type] = "filter1"),'KPI: Slicer'[Type] )+0 > 0, [KPI1],0)+
if(countx(filter('KPI: Slicer'[Type] , 'KPI: Slicer'[Type] = "filter2"),'KPI: Slicer'[Type] )+0 > 0, [KPI2],0)+
if(countx(filter('KPI: Slicer'[Type] , 'KPI: Slicer'[Type] = "filter3"),'KPI: Slicer'[Type] )+0 > 0, [KPI3],0)
)
Works perfectly, thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
206 | |
150 | |
97 | |
78 | |
69 |