Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 in these tables are ALOT and when I tried to join them into one table that has all the columns I need, the processing is much too long.
Suppose I have two tables, A and B, and table A has colums of people's ids and their dates of registration, and table B has columns of people's ids and their status.
Table A
ID
Date
Table B
ID
Status
I want to be able to create a measure that can filter the ID's of people with a certain status for a given date. For example, A measure that shows All the IDs that have a status of "Away" for today. Basically, how can I filter columns in both of these tables using one measure without inner joining the tables?
Thanks in advance.
Solved! Go to Solution.
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] )
)
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] )
)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
60 | |
60 | |
54 | |
38 | |
27 |
User | Count |
---|---|
85 | |
60 | |
45 | |
41 | |
39 |