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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

SQL parameter error

So i am unable to execute a query to determine the average of a filed.  explanation as follows 

 

I have 'OpenDate' - which represents the case open date with the time and 'ResolveDate' - which represents the date & time when the case is resolved.  I have created a filed - 'Resolvetime' as a new measure in POWERBI which shows the "average time taken to resolve in minutes" for a paticular ticket. 

The formula for the above mentioned is "Resolvetime = DATEDIFF(SUM('Call Request Detail'[OpenDate]),SUM('Call Request Detail'[ResolveDate]),MINUTE" which works fine.

 

 

ticket.PNG

 

Now i would like to determine the averge 'Resolvetime' for all the tickets within a particluar time frame i.e. 'OpenDate' and 'ResolveDate'.   To determine the average i used the below mentioned formula

"Average = AVERAGE((DATEDIFF(SUM('Call Request Detail'[ResolveDate]),SUM('Call Request Detail'[OpenDate]),HOUR)))" 

 

Upon using the formula i am getting the follwing error message 

error message.PNG

 

 

I used the formula because i created the field 'Resolvetime' in PowerBI not in the Datawarehouse as i don't ahve access to change anything in the warehouse. there's a team to do them functions.  

 

So, can anyone help me to determine the average of 'Resolvetime' ? 

 

I am assuming the follwing reasons for the error message 

  1. Resolvetime is declared as an integer by default and it is acceptable for tickets with smaller resloving time ( minutes). I am aware that we can't change the filed type in BI. 

 

can someone please advice me on this issue. It is my first week at internship and i am feeling frustrated. 

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Please refer to this similar thread, you could have a reference of the solution of v-shex-msft first.

 

In addition, we could change data type in Power BI under modeling tab.

 

change data type.PNG

 

If you still need help, please share some data sample and your desired output, so that we can help further investigate on it?

 

Best Regards,

Cherry

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

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Please refer to this similar thread, you could have a reference of the solution of v-shex-msft first.

 

In addition, we could change data type in Power BI under modeling tab.

 

change data type.PNG

 

If you still need help, please share some data sample and your desired output, so that we can help further investigate on it?

 

Best Regards,

Cherry

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

Thanks, I have escalated the issue to the warehouse team and they are creating a cube in the warehouse. 

 

Thanks for the help tho 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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