Forum Discussion
Measure based on Parameter
- 9 years ago
I figured it out, so I'll post what I did on here in case someone comes across this in the future.
I created a separate blank query then "entered data" by pasting a column of all unique country names. Then measure DAX:
Client Cost Index = CALCULATE(DIVIDE([Unit Cost],CALCULATE([Unit Cost],Vendors[VendorCountry]=VALUES(Parameter[ParameterCountry]))),FACTS[FactSource]="Client")
Then just throw another slicer on the dashboard and drop the [parametercountry] in it. It'll show an error on any visual unless only one selection on that slicer is selected.
Cost Index = DIVIDE([Unit Cost],CALCULATE([Unit Cost],Vendors[Country]=VALUES(CountryParameter[CountryParameter])))
I changed it to this ^ and got numbers that look right when the parameter is set to China. but now when i change the parameter to say, Vietnam, it isn't updating anything.
Thoughts?