Forum Discussion
How to create a custom SLICER?
Hi Anonymous ,
You will need to create a new table with couluns contains measures' name.
Use this table as slicer with following measure.
Measure = SWITCH(SELECTEDVALUE('Table (2)'[slicer]),"sum",[sum],"avg",[avg])
Sample data for your reference.
Best Regards,
Jay
Anonymous thanks but can you tell me please what is the below and how do I create it?
'Table (2)'[slicer]
Thanks!
- Anonymous6 years agoNot applicable
Hi Anonymous ,
It's a simple table contains measures' name as the slicer.
Pbix as attached, hopefully works for you.
Best Regards,
Jay
- Anonymous6 years agoNot applicable
Anonymous thanks but unfortunately I cannot open your test.pbix, it displays an error and it closes
From what I understand, I will need to create both one table and one measure, is that right?
Can you paste please the code for the two and I will try to figure out.
Thanks!
- Anonymous6 years agoNot applicable
Hi Anonymous ,
avgx = AVERAGEX(ALL('Table'),'Table'[Column2]) sumx = SUMX(ALL('Table'),'Table'[Column2]) Measure = SWITCH(SELECTEDVALUE('Table (2)'[slicer]),"sum",[sumx],"avg",[avgx])Table2 is a sample table which i create manually use Enter Data feature.
Best Regards,
Jay