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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
antara_centri
Frequent Visitor

sum/Average incorrect in calculated column in Power BI desktop

Hello All,

 

I have created a calculated column 

 
Initial Response Time(Minutes) =
IF(
    ISBLANK('Incidents created after Jan 1 2022'[Initial Response Date]),
    0.00,  
    DATEDIFF(
        'Incidents created after Jan 1 2022'[Created Date],
        'Incidents created after Jan 1 2022'[Initial Response Date],
        MINUTE
    )
)
 
when I am computing this in a matrix in power BI the sum and average  is coming wrong.I have the same dataset in excel and the sum is different.How do I fix the error in Power BI
 
Power BI
antara_centri_0-1693491592548.png

 

 Excel:

antara_centri_1-1693491673797.png

 

3 REPLIES 3
mussaenda
Super User
Super User

Hi @antara_centri ,

 

Have you perform any merging on your fact table?

Because it is really strange that they have a big gap.

 

 

Anonymous
Not applicable

Hi @antara_centri ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@antara_centri , I doubt sum can be wrong in power bi for a calculated column. for better avg you can use blank in place of 0

 

Initial Response Time(Minutes) =
IF(
ISBLANK('Incidents created after Jan 1 2022'[Initial Response Date]),
blank() ,
DATEDIFF(
'Incidents created after Jan 1 2022'[Created Date],
'Incidents created after Jan 1 2022'[Initial Response Date],
MINUTE
)
)

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors