Forum Discussion
Filter based on Table
Click on Enter Data and create a custom table.
Let's say table test; give a column name as 'column_name' and under that provide your 4 table names i.e. Table1 to Table4.
Add this table to a slicer visual.
Create a sum of Difference measure;
Sum_Diff=Difference_Table1+Difference_Table2+Difference_table3+Difference_table4.
Create a measure which will show your difference values;
Difference=
var a=Test['column_name']
return
SWITCH(TRUE(),
a=Table1,[Difference_Table1],a=Table2,[Difference_Table2],a=Table3,[Difference_Table3],a=Table4,[Difference_Table4],[Sum_Diff])
Let me know if it works.
If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up
i cannot get the first line working (var a=Test['column_name']), it is not reading the table, am i doing something wrong
- Anonymous4 years agoNot applicable
If you have properly created the custom table using 'Enter Data' then you won't have any problem passing Table name inside the SELECTEDVALUE function.
Cross check again.
Thanks,
Sanket- Yaya19904 years agoFrequent Visitor
Yes when using, the selected value, it is showing it in the dax, but when i use switch command, i dont see any of my tables:
is this becuase Create a sum of Difference measure;
(Difference_Table1,Difference_Table2,Difference_table3,Difference_table4) are calculated columns not a measure.if they are columns what could be the solution? i would highly appreciate.
- Yaya19904 years agoFrequent Visitor