- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Need to compare two tables and count number of customers not in balance
Table 1 CustomerMaster:
CustomerNumber | Customer Name |
100 | Apple |
101 | Microsoft |
Table 2, Open invoices in ERP:
CustomerNumber | Invoice | Amount |
100 | 3 | 1000 |
100 | 4 | 2000 |
101 | 5 | 3000 |
Table 3, Open invoices InvoicePartner:
CustomerNumber | Invoice | Amount |
100 | 3 | 1000 |
101 | 5 | 3000 |
Relationship is on KundeNummer in each table.
I have a measure to calculate the difference of these two tables.
Measure is:
Difference = VAR _DIFF_CHECK = [SUM ERP]-[SUM InvoicePartner] Return IF(_DIFF_CHECK<>0, _DIFF_CHECK)
it returns this:
CustomerNumber | Difference |
100 | 2000 |
101 | 0 |
How can i create a card visual/measure to say that number of customers with difference is 1?
i am not able to do a countIF(Difference<>0)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To create a card visual or measure that displays the number of customers with differences in the "Difference" measure, you can follow these steps:
- Create a new measure that calculates the count of customers with differences:
CountOfCustomersWithDifferences = COUNTROWS(FILTER(CustomerMaster, [Difference] <> 0))
This measure counts the rows in the "CustomerMaster" table where the "Difference" measure is not equal to 0.
Add a card visual to your report.
In the card visual, use the "CountOfCustomersWithDifferences" measure as the value to display.
Now, your card visual will show the number of customers with differences in their invoices. If the "Difference" measure is not equal to 0 for a customer, it will be counted in this card visual. In your example data, it will show "1" because there is one customer with a difference (CustomerNumber 100).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try below with same relationship which you mention
make measure in customer master table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To create a card visual or measure that displays the number of customers with differences in the "Difference" measure, you can follow these steps:
- Create a new measure that calculates the count of customers with differences:
CountOfCustomersWithDifferences = COUNTROWS(FILTER(CustomerMaster, [Difference] <> 0))
This measure counts the rows in the "CustomerMaster" table where the "Difference" measure is not equal to 0.
Add a card visual to your report.
In the card visual, use the "CountOfCustomersWithDifferences" measure as the value to display.
Now, your card visual will show the number of customers with differences in their invoices. If the "Difference" measure is not equal to 0 for a customer, it will be counted in this card visual. In your example data, it will show "1" because there is one customer with a difference (CustomerNumber 100).

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
04-19-2024 05:00 AM | |||
09-13-2024 01:56 PM | |||
09-03-2024 09:40 AM | |||
07-22-2024 08:36 PM | |||
07-31-2024 03:09 AM |
User | Count |
---|---|
24 | |
12 | |
10 | |
10 | |
8 |
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
10 |