Forum Discussion
PowerBIMaster97
3 years agoNew Member
Need help with using columns in two tables without inner joining them
Hello Everyone, The issue I'm currently facing is: I need to use columns that exist in both tables (they have a matching ID column) in order to create some measures and a view. However, the rows ...
- 3 years ago
You could use a virtual relationship in your measure using the TREATAS function. The TREATAS function is processed in the filter part of the CALCULATE function. For example, you can count the number of people based on Table A, taking into account the filters from Table B:
Number of people = CALCULATE ( DISTINCTCOUNT ( 'Table A'[ID] ), TREATAS ( VALUES ( 'Table B'[ID] ), 'Table A'[ID] ) )
Barthel
Solution Sage
3 years agoYou could use a virtual relationship in your measure using the TREATAS function. The TREATAS function is processed in the filter part of the CALCULATE function. For example, you can count the number of people based on Table A, taking into account the filters from Table B:
Number of people =
CALCULATE (
DISTINCTCOUNT ( 'Table A'[ID] ),
TREATAS ( VALUES ( 'Table B'[ID] ), 'Table A'[ID] )
)