Forum Discussion
Anonymous
6 years agoNot applicable
How to create a custom SLICER?
Hello I have two sets of criteria, e.g.: CriteriaSet1: Col1 = A || Col2 <> B && Col3 = C CriteriaSet2: Col1 = D || Col2 <> E && Col3 = F I want to use these criteria to filter a table. I ...
Anonymous
6 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!
Anonymous
6 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