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
Roseventura
Responsive Resident
Responsive Resident

Count number of rows after a filter(s) is applied

This seems almost so easy I'm embarrassed to post this question.  That being said:

 

I have a table showing Customer Name, Item Number, Sales Order, Sales Order Number and Qty.  I'm trying to create a measure that will calculate the total number of lines based on the filtered table.  I have two filter visuals that allow the user to filter by customer and/or Item Number, but the Total Number of Sales Lines is always incorrect.

 

In this example, I'm expecting the Total Sales Lines to = 3, not 5.

 

What am I missing?  The measure is shown at the top:

 

capture12.JPG

 

 

1 ACCEPTED SOLUTION

I figured out what's causing this.  If I look at the raw data, it shows that I actually have 5 lines for this Customer and Part.  What I was missing is what makes each of those 5 lines unique - the serial number.  When I add in the serial number to the table, I can see all 5 lines lines.  5 is acutally the correct number of lines.

 

 

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

Did you forget to post an image or something?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Do you not see the image?

 

I will post again here:

 

capture12.JPG

 

 

Hi @Roseventura,

Your measure could work on my side, could you please offer a sample data to have a test if possible?

 

Regards,

Daniel He

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

I figured out what's causing this.  If I look at the raw data, it shows that I actually have 5 lines for this Customer and Part.  What I was missing is what makes each of those 5 lines unique - the serial number.  When I add in the serial number to the table, I can see all 5 lines lines.  5 is acutally the correct number of lines.

 

 

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.