Forum Discussion
jcloss13
8 years agoFrequent Visitor
Issue with using a lookup table in calculation.
Good Morning, I feel like this issue should be easily solved but I can't figure it out. I have two tables, Table A and Table B. Table A has the detail record and the number of transactions...
- 8 years ago
Hi,
The mistake you are committing is that you are creating a relationshop from Table A to Table B. There are two ways to go about solving this problem:
- Create a master table of all unique Locations from Table A and table B (let's call that new table Table C) [This master table can be create by appending Table A and Table B, removing all column expcet Location and then removing duplicated form the location column]. Then create a relationshop from Table A to Table C and Table B to Table C. After this a simple SUM measure will work as expected. Remember to drag location from Table C in your visual
- If you do not wish to create Table C as proposed above, you can use the RELATEDTABLE function in Table B (after creating a relationshop from Table A to Table B). In a calculated column in Table B, enter this formula
=SUMX(RELATEDTABLE(location_time),location_time[Transaction time])
Now create your visual from Table B.
CahabaData
8 years agoMemorable Member
to clarify where you say: the output I am getting looks like
you are getting "N/A" in what type of visual? a table or matrix visual? at the table level is this field modeled to be a number type or is it a text type?