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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jtbonner1986
Helper I
Helper I

Count Non Matching Rows With One to Many relationships

Hello, 

 

I am trying to count the number of Non Matching rows I have in a pricing table, where the prcing table can contain multiple prices for a single material; 

 

Example;

Program Table 

 

MaterialProgram
123A
456A
789A

 

Pricing Table

 

MaterialPriceDate
123£10001/01/2024
123£6030/01/2024
000£50001/01/2024

 

I want a single measure to calculate how many materials i dont have a pricing for in program 'A'. 

 

in this case it would be 2

 

I essentialy dont care how many enteries a material has in the pricing table, thee could be 100s or dates. I just want to understand how many materials i do not have pricing for 

 

thanks

5 REPLIES 5
v-veshwara-msft
Community Support
Community Support

Hi @Jtbonner1986 ,

We’re following up again regarding your query. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.

If you still need assistance, please let us know.
Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @Jtbonner1986 ,

Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries. 

Otherwise, feel free to reach out for further assistance.

Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @Jtbonner1986 ,
Thanks for reaching out to Microsoft Fabric Community,
Just wanted to check in if you have resolved your query, if not please consider the following:

To count how many materials in Program A do not have any pricing records, you can use the following DAX measure:

Count of Materials Without Pricing = 
CALCULATE(
    COUNTROWS(
        FILTER(
            VALUES(Program[Material]),
            NOT Program[Material] IN VALUES(Pricing[Material])
        )
    ),
    Program[Program] = "A"
)

Here is the output:

vveshwaramsft_0-1746269173410.png

 

vveshwaramsft_1-1746269238710.png

 

Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.

 

Thank you.

 



Deku
Super User
Super User

Countrows( except( values( program[material] ), values( pricing[material] ) )


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

This only works when there is no relationship between the tables.. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.