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
Anonymous
Not applicable

Aggregate Discrepancies Between Data and Measure Counting Rows

Hello All,

A really strange behavior...

I have a table where one column is calculated -->

Vacancy = 'Table1'[columnA] - 
COUNTROWS(FILTER(RELATEDTABLE('Table2'),'Table2'[isDeleted] = FALSE()))

This column shows me the correct numbers for each record.

 

I created a measure to count these rows where Vacancy > 0 -->

Measure = COUNTROWS(FILTER('Table1','Table1'[Vacancy] > 0))

This shows me 19 where in the original table there are 18 rows that answer the filter condition.

 

How is that possible?

Disc.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Solution.

 

I found that in my calculated column I have NULL values.

So I was trying to substruct NULLS. i.e. NULL - n.

This caused the records not to show.

I fixed it by writing a 'IFNULL'=0 function in my original query and now I can see all records again.

 

Cheers!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Solution.

 

I found that in my calculated column I have NULL values.

So I was trying to substruct NULLS. i.e. NULL - n.

This caused the records not to show.

I fixed it by writing a 'IFNULL'=0 function in my original query and now I can see all records again.

 

Cheers!

Anonymous
Not applicable

New Finding.

 

I found that 3 records is missing from the table.

So, in the original table in the MySQL DB I have 62 records and the visualization shows me 59 records.

I have a page level filter which is working fine.

Other visualizations show correct number of rows.

 

How is that possible?

 Having X in the original table and X-n in the visualization table?

Thanks
A

v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Are there some duplicate records in original table? If so, when you add them to table visual, duplicates will appear only once. Besides, please remove aggregation of all fields in table visual, and check the output again.

 

Regards,

Yuliana Gu 

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

Hi @v-yulgu-msft

Thanks for the reply.

 

I do not have duplicates in the origianl table.

Each record has a unique id.

 

There are no aggregations in the table visual.

 

Thanks!
A

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.