Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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...
  • johnt75's avatar
    johnt75
    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