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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Oaabwen42
Frequent Visitor

Power BI Doing Division Incorrectly

Hi everyone,

 

I'm trying to make a very simple "average number of support tickets per month" calculation. I have the following:

 
Avg Tickets Per Month =
DIVIDE(
    COUNTROWS(Table),
    DISTINCTCOUNT(Table[YearMonth]), 0)
 
However, the number it returned, 4.33, didn't seem right. I split the COUNTROWS and DISTINCTCOUNT functions into their own measures to test:
 
Tickets = COUNTROWS(Table)
Months = DISTINCTCOUNT(Table[YearMonth])
 
Tickets returned 52, and Months returned 9. So Avg Tickets Per Month should be 52 / 9 = 5.77
 
I also tried the following and got 4.33 again:
 
Avg Tickets Per Month = DIVIDE([Tickets], [Months], 0)
 
What is going on??? I don't see why it would return the wrong number
1 ACCEPTED SOLUTION

@Oaabwen42 , Make sure there is no visual level filter on that card

Try this measure for count distinct

countrows(values(Table[YearMonth]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
powerbiexpert22
Impactful Individual
Impactful Individual

Hi @Oaabwen42 ,

are you using table or card visual ? would you please share sample pbix or sample data?

Hi,

I'm using a card visual. I can't share the sample pbix or data, but you can see what's happening in this screenshot: 

Oaabwen42_0-1735922981527.png

Tickets = 52, Months = 9, therefore DIVIDE(52, 9, 0) = 5.77, but it returns the wrong number.

@Oaabwen42 , Make sure there is no visual level filter on that card

Try this measure for count distinct

countrows(values(Table[YearMonth]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.