Forum Discussion
Create calculated column in Live connection
Hello All,
I have 2 tables, Table 1 is live connection(Using existing dataset) and Table 2 is import file. The Employee ID present in import file should be shown as "Flag - Internal", and for other records should be shown as "External" or "Blank".
We have to bring that Flag column from table 2 to table 1. Using RELATED function we can achieve this but since Table 1 is live connection unable to create Calculate column and Calculate Table.
Using relationship between these 2 table if we directly drag and drop the Flag column in a table visual, data will filtered out where Flag = Internal. Flag = External won'tbe appeared in the visual. I believe it should be handled in Measure.
Please advice how to achieve this measure.
Arioli_Chezhian Please Try This one.
Flag =IF (SELECTEDVALUE ( 'Table 1'[Emp ID] ) = MAX ( 'Table 2'[Emp ID] ),"Internal","External")
14 Replies
- Mahesh0016Super User
Arioli_Chezhian Table 1 is your fact table and Table 2 is the Dimension Table, Right?
- Arioli_ChezhianHelper II
Mahesh0016 yes, that's correct.
- Mahesh0016Super User
Arioli_Chezhian I hope this helps you. Thank you.
>Create Following Measures :
Tbl1 =
SUM ( 'Table Workspace'[Emp ID] )
#################################
Tbl2 =
SUMX ( 'Table Flag', [Tbl1] )
################################
Flag =
IF ( [Tbl1] = [Tbl2], "Internal", "External" )