Forum Discussion
Power BI count null rows
Hi!
I have two columns. Both have a general key INT value called TicketId, but one table has less TicketIds than another table. Each table has different amount of columns.
For example, the current counting of rows looks like this:
| Dates | Tab1 | Tab2 |
| 08.11.2022 | 1058 | 950 |
| 09.11.2022 | 1058 | 1056 |
| 22.11.2022 | 2342 | 302 |
I am looking for a DAX measure forluma that will calculate TicketIds that exist in Tab1, but doesn't exist in Tab2. It should be not a formula like 1058 - 950 = 108. Because after there will be drillthrough to show all the TicketIds that were calculated (exist in Tab1 and doesn't exist in Tab2).
| Dates | Tab1 | Tab2 | Tabcross |
| 08.11.2022 | 1058 | 950 | 108 |
| 09.11.2022 | 1058 | 1056 | 2 |
| 22.11.2022 | 2342 | 302 | 2040 |
- Anonymous3 years ago
Hi bombom ,
You can create a measure as below to get it:
Tabcross = VAR _tab = EXCEPT ( VALUES ( Tab1[TicketId] ), VALUES ( Tab2[TicketId] ) ) RETURN COUNTROWS ( _tab )If the above one can't help you get the desired result, please provide some sample data in your table 'Tab1' and 'Tab2' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
4 Replies
- NishudhanFrequent Visitor
Hi,
you can use set operator - Except
=except(table1,table2)
- NishudhanFrequent Visitor
Hi,
Can you try left anti join -(which returns all the records from left which is not there in right)which is in the power query - Home-Merge as new
- AnonymousNot applicable
Hi bombom ,
You can create a measure as below to get it:
Tabcross = VAR _tab = EXCEPT ( VALUES ( Tab1[TicketId] ), VALUES ( Tab2[TicketId] ) ) RETURN COUNTROWS ( _tab )If the above one can't help you get the desired result, please provide some sample data in your table 'Tab1' and 'Tab2' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards