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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply

How can I get the average GAP (last Column)

Hi Friends,

 

I have created a measure that shows the gap in hours between the (Earliest Sign up) 2nd column and (First order date)3rd column. I now need to know the average gap to visualize it as a card. Please help me. 


Measure used:

Gap from sign up to First Order (HOURS) = Datediff('Key Measures'[Earliest Sign up], [First Order Date], HOUR)

 

7.png

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Average gap = AVERAGEX( ADDCOLUMNS( VALUES( 'Table'[full_name]), "@val", [Gap measure]), [@val])

View solution in original post

7 REPLIES 7
moizsherwani
Continued Contributor
Continued Contributor

@Andrew_na_lang Assuming you want to get an average per "full_name", you could use an AverageX function such as 

 

AverageSignup = AVERAGEX(values(full_name),[Gap from signup to First Order (Hours)])

 

Thanks,

Moiz
Was I able to answer your question? Mark my post as a solution to help others. Kudos if you liked the solution.

@moizsherwani actually what I need is the average gap (Total) not the average sign up.

johnt75
Super User
Super User

Average gap = AVERAGEX( ADDCOLUMNS( VALUES( 'Table'[full_name]), "@val", [Gap measure]), [@val])

@johnt75 I don't need a new column. I just need the total average of gap from sign up to first order. 

Its not a column, its a measure. Put this measure on a card visual and it will show the average gap

 Not working

7.png

You need a close ) after the measure ], then delete the extra ) at the end of the line

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors