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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
Microsoft Employee
Microsoft 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.