Forum Discussion
Anonymous
3 years agoNot applicable
DAX Measure error - to remove fixed values with table column fields
Hi Experts The following measure currently has fixed values i want to changes thes to table column fields. Current MEasure Measure 2 =
VAR _CountryStore = "(Cananda),(Italy);[004],[005]"
V...
- 3 years ago
You could try something like
Selected countries and stores = VAR _Countries = "( " & CONCATENATEX( VALUES( 'pg_control_cases'[country_dim.country_name] ), 'pg_control_cases'[country_dim.country_name], "," ) & " )" VAR _Stores = "( " & CONCATENATEX( VALUES( 'pg_control_cases'[bu_code] ), 'pg_control_cases'[bu_code], ", " ) & " )" RETURN _Countries & ";" & _Stores
johnt75
3 years agoSuper User
Why do you need to split them if they are already in separate columns ?
Anonymous
3 years agoNot applicable
My question is how do i make the following dynamic based on slicer selction not fixed value in
VAR _CountryStore = "(Cananda),(Italy);[004],[005]"
The Country values come from
With pg_control[Country] and store from
ps_control[store]
- johnt753 years agoSuper User
You can use SELECTEDVALUE
VAR _Country = SELECTEDVALUE('pg_control'[Country]) VAR _Store = SELECTEDVALUE('ps_control'[store])- Anonymous3 years agoNot applicable
Tried selected value but it goes wrong from here onwards
VAR SeparatorPosition = SEARCH ( ";", _CountryStore ) VAR _Length = LEN ( _CountryStore ) VAR _Country = LEFT ( _CountryStore, SeparatorPosition - 1 ) VAR _Store = MID ( _CountryStore, SeparatorPosition + 1, _Length - SeparatorPosition ) RETURN CONCATENATE ( _Country, CONCATENATE ( ";", _Store))- johnt753 years agoSuper User
I don't understand. You say that the country and store values are coming from separate columns, what is populating the slicer ?