Forum Discussion
reggiebob
1 year agoFrequent Visitor
Column Value adjusted based on Slicer Selection
Hello, I am trying to figure out how to accomplish the following and I am hoping someone has an idea of how it can be done: If you have a slicer with column values and a table visual with another...
- Anonymous1 year ago
Hi reggiebob ,
Do you want to count sales for unselected "Site Type" as "None"? If so, please try this.
Create a measure with below DAX.
TotalSales = VAR _selected = ALLSELECTED(Customer[Site Type]) VAR _maxOwner = MAX('_Owner'[Owner]) VAR _national = CALCULATE(SUM(Sales[ Total Sales ]),Customer[Owner] = _maxOwner) VAR _noselected = CALCULATE(SUM(Sales[ Total Sales ]),NOT(Customer[Site Type] IN _selected)) RETURN IF( _maxOwner="None",_national+_noselected,_national)The output.
——————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li
Anonymous
1 year agoNot applicable
Hi reggiebob ,
Do you want to count sales for unselected "Site Type" as "None"? If so, please try this.
Create a measure with below DAX.
TotalSales = VAR _selected = ALLSELECTED(Customer[Site Type])
VAR _maxOwner = MAX('_Owner'[Owner])
VAR _national = CALCULATE(SUM(Sales[ Total Sales ]),Customer[Owner] = _maxOwner)
VAR _noselected = CALCULATE(SUM(Sales[ Total Sales ]),NOT(Customer[Site Type] IN _selected))
RETURN IF( _maxOwner="None",_national+_noselected,_national)
The output.
——————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li
reggiebob
1 year agoFrequent Visitor
This is perfect. Thank you!