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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
Please, I need to make a column where I can count how many rows there are in another column of the other table, but I need that when I apply the visual filter, the number changes.
For example:
I have two tables, Table and Table Count.... Then in the Table Count I made a column and wrote the expression "CALCULATE(COUNT('Table'[ID]))". After that I created a card and in the field put the column that I have just created, as the number of the rows in the Table is 2, the number that the card shows is 2. Perfect!
The problems is because when I use the visual filter in this card using the Table, not the Table Count and select just a line, the number does not change.
Could somebody help me please?
Best regards,
Hi @Anonymous
You need a measure. Calc columns are static
Can you show a sample of the two tables and explain exactly what you need? Count rows how, based on what?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @AlB,
Thank you for the answer!
I know, but the problem is that I can't use measure because one of the tables is one calendar... Let me explain to you:
I have one table where there are days from today to the next 7 days, and in each day I need to calculate how many rows I have in the another table for example:
Table A
Date Aircrafts With Problems
01/13 2
01/14 4
01/15 5
In the Column Aircrafts With Problems I use a calc column with a lot of filters.
Table B
Aircraft Type Status Date Next Status Date Last Status
C152 Open Null
C172 Close Null
So, the Table A does not have realtionship with the Table B, I created the cal column for to calculate how many aircrafts I have in that day, and I need that it works with the visual filter, because I need to filter for the Aicraft Type, because if it does not work, I will have to create a cal column for each Aircraft Type, for example:
Table A (Example)
Date C152 Aircrafts With Problems C172 Aircrafts With Problems
01/13 2
01/14 4
01/15 5
Could you understand me?
Best regards,
@Anonymous , There needs to some filter that we need to common to make sure you get a different count.
As a new column in Table A, I tried adding a date relation
C152 Aircrafts With Problems = countx(filter(TableB, table2[status] = "Open" && isblank(tableB[Date Next Status]) && tableB[Date Next Status] >TableA[Date]),table2[Aircraft Type])
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |