Forum Discussion
nix_ferreira
2 years agoRegular Visitor
Using data segmentation filter results in DAX calculation
Hello! I have a table that has data and one column (stock) that I use as a filter. This column only has null, 0 and 1 values. The thing is: I want to use this column in a data segmentation filter...
Moetazzahran
2 years agoResolver II
Hello nix_ferreira,
You can create a variable with the name you specified and enclose the the slicer column you are using with the Selectedvalue (VAR)
Please try below.
new_column =
VAR user_defined_stock=SELECTEDVALUE(slicercolumn)
Return
CALCULATE( column_1 - column_2, stock = user_defined_stock )
Please let me know if it solves your requirement. If so, please accept it as a solution, and your kudo is much appreciated.