Forum Discussion
jhdavis
9 years agoRegular Visitor
Measure based on Parameter
I'm trying to use the parameter function in PBI desktop to find cost index: countries' unit costs divided by a baseline country's unit costs. The baseline country is the parameter country that I woul...
- 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.
jhdavis
9 years agoRegular Visitor
I've tried adding in that the country dimension is equal to the parameter as well
Cost Index = DIVIDE([Unit Cost],CALCULATE([Unit Cost],Vendors[Country]=CountryParameter[CountryParameter]))
no luck