Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a table visual that is showing column fields coming from two tables (A and B) having as relationship:
- One two many
- Both filtering Direction
- Not all data from both tables are having link together
In such configuration, let's say I have fields from table A in my visual table as columns, If I add new fields coming from Table B, it will filter down the displayed data to only intersection data existing in A and B, which is fine.
Thus, the amount of rows being displayed in my table visuals is depending on the columns being added to my visual table fields.
My question now is how to calculate this amount of rows in a measure?
I am missing a triger with an if condition to know if columns from one of the tables had been added to the table visual or not.
ISFILTERED is not working as adding a field value to a table is actually not a direct filter and ISCROSSFILTERED is always TRUE as both tables have cross filtering relationship.
I would need a way to check if field or table is added to visual or something that can replicate the filtering behaviour that is happening when the table visual is filtering the displayed rows when columns from both tables are added together.
Thanks
Rgds
Marc.
Hi @Marco57
If you want to count rows that table a in table b, try to build measures.
Here I build a sample.
Table A
Table B:
Relationship is one to many.
A IN B =
CALCULATE(COUNTROWS('Table A'),FILTER('Table A','Table A'[Cagetory] IN VALUES('Table B'[Category])))
B IN A =
CALCULATE(COUNTROWS('Table B'),FILTER('Table B','Table B'[Category] IN VALUES('Table A'[Cagetory])))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Marco57 , Are you looking for base data here - "My question now is how to calculate this amount of rows in a measure?"
In that case, you need to create a drill-through report will all row-level columns. Or add index column in Table B and use that in visual
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |