Forum Discussion
Create a relationship between Fact Table Values and Measure Values
- 1 year agoCPL FB =SWITCH(SELECTEDVALUE(Countries[Country]),"DE",DIVIDE([Sum Spend DE FB],[Sum Leads DE FB],0),"AT",DIVIDE([Sum Spend AT FB],[Sum Leads AT FB],0))
lbendlin wrote:How many countries? How many platforms? You may want to refactor your source data to include the country attribute in the fact table.
It will be 17 countries in total.
You may want to refactor your source data to include the country attribute in the fact table.
I'm getting Data from a direct query and I'm building the country-reference in the measure with certain attributes from this direct query (account name, campaign name).
Example:
I would like to include the country attribute in the fact table, but I don't know how this could work with a direct query.
That's why I was headed towards the approach with the static country table and then somehow link the measures to it.
In that case you are indeed staring down the barrel of having to use the SWITCH statement 17 times.