Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
bombom
Helper I
Helper I

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:

 

DatesTab1Tab2
08.11.20221058950
09.11.202210581056
22.11.20222342302

 

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).


DatesTab1Tab2Tabcross
08.11.20221058950108
09.11.2022105810562
22.11.202223423022040
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

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

 

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

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

 

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Nishudhan
Frequent 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 

Nishudhan
Frequent Visitor

Hi,

you can use set operator - Except

=except(table1,table2)

 

 

Hello @Nishudhan ,

Thank you. I tried it, but there is an error: "All table arguments to the "EXCEPT" function must have the same number of columns.". It's true. Each of my tables have different amount of columns. So it looks like this formula wouldn't work...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors