Forum Discussion
Compare Two Columns from two tables and Get result
- 7 years ago
Hello pjdsh ,
We can add an index column to your Table1 that will keep the visual from grouping the category (A, B, C, etc).
In the query editor, add a step to Add Column > Index
Then, in our Table1 we can pull over the value from Table2. The two tables have to be related on Column1.
Then in Table1 we add the calculated column to pull over the value and put 0 in the blanks.
Value = VAR TheValue = RELATED(Table2[Value]) RETURN IF ( ISBLANK ( TheValue ), 0, TheValue )
In our visual we add the index, column1 and value all from Table1 and you can make the index column skinny enough you don't see it, you just have to turn off wordwrap on headers and values.
I uploaded my sample file here for you to take a look at. https://www.dropbox.com/s/fvgv5uhdipjzas8/RelatedTable.pbix?dl=0
Thanks for your valueble inputs. I will try this approach.
Hello jdbuchanan71 , Thanks a lot for the help. It worked..