Forum Discussion
Data Mapping based on other table's field name
- 3 years ago
Hello CoTheiss
You can create a calculated column in your Data Table as
Score =IF('DataID'[Column1]=BLANK(),0,CALCULATE(sum(Score[Score]),FILTER(Score,Score[Datacolumn]="column1")))+ IF('DataID'[Column2]=BLANK(),0,CALCULATE(sum(Score[Score]),FILTER(Score,Score[Datacolumn]="column2")))+IF('DataID'[Column3]=BLANK(),0,CALCULATE(sum(Score[Score]),FILTER(Score,Score[Datacolumn]="column3")))--------------------------------------------------------------------------------------------------
Also you can achive this by unpivoting Data table col1, col2, col3 in advance editor.
After that you need to merge data table and score table on column "Datacolumn".
After merging your Data table look like this, then you can aggregate the data or create measure to get your desired result.
Regards,
Novil
If I answer your question, please mark my post as a solution.
Hello CoTheiss
You can create a calculated column in your Data Table as
--------------------------------------------------------------------------------------------------
Also you can achive this by unpivoting Data table col1, col2, col3 in advance editor.
After that you need to merge data table and score table on column "Datacolumn".
After merging your Data table look like this, then you can aggregate the data or create measure to get your desired result.
Regards,
Novil
If I answer your question, please mark my post as a solution.
- CoTheiss3 years agoFrequent Visitor
Hi PawarNovil
I just tried the first approach with the calculated column and it works!
I also learned, that having a datafield with len(Field)=0 does not neccessarily equals blank() - as I needed to adapt the formula to if('Data'[Column2]="",...)
I did not try the second approach (yet) as the first one was sufficient already (and my dataset is quite wide and long)