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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
romovaro
Responsive Resident
Responsive Resident

Compare monthly average vs Total Average

Hi

 

I have an issue with a calculation and crating a measure

 

romovaro_1-1702979697008.png

Tried diff formulas but not working so far. Any tip?

 

Now I want to create a difference between the monthly average vs Total (in this case 14.52)

 

July: 14.18 - 14.52

Aug: 14.81 - 14.52

etc...

 

romovaro_2-1702979754363.png

 

Thanks,
 
1 ACCEPTED SOLUTION
v-weiyan1-msft
Community Support
Community Support

Hi @romovaro ,

 

Based on the sample and description you provided, Please try code as below.
My Sample:

vweiyan1msft_0-1704336444766.png

Total Average =
VAR _Day =
    SUM ( 'LOA assignations'[LOA Sig date vs greenlight date] )
VAR CNT =
    COUNTROWS ( 'LOA assignations' )
RETURN
    _Day / CNT
LOA Month Comp =
AVERAGE ( 'LOA assignations'[LOA Sig date vs greenlight date] )
    - SELECTEDVALUE ( 'LOA assignations'[Total Average] )

Result is as below.

vweiyan1msft_1-1704336622297.png

 

If this reply still couldn't help resolve your issue, please feel free to ask us. Please share more details or share a sample pbix after removing sensitive data with us.

 

Best Regards,
Yulia Yan

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

3 REPLIES 3
v-weiyan1-msft
Community Support
Community Support

Hi @romovaro ,

 

Based on the sample and description you provided, Please try code as below.
My Sample:

vweiyan1msft_0-1704336444766.png

Total Average =
VAR _Day =
    SUM ( 'LOA assignations'[LOA Sig date vs greenlight date] )
VAR CNT =
    COUNTROWS ( 'LOA assignations' )
RETURN
    _Day / CNT
LOA Month Comp =
AVERAGE ( 'LOA assignations'[LOA Sig date vs greenlight date] )
    - SELECTEDVALUE ( 'LOA assignations'[Total Average] )

Result is as below.

vweiyan1msft_1-1704336622297.png

 

If this reply still couldn't help resolve your issue, please feel free to ask us. Please share more details or share a sample pbix after removing sensitive data with us.

 

Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Ahmedx
Super User
Super User

Share sample pbix file to help you.

romovaro
Responsive Resident
Responsive Resident

Hi Ahmed, I will try later. Cannot do it in my company due to system restrictions

 

Avg Days is a Datediff formula to see the days btw the 2 dates.

LOA Sig date vs greenlight date = DATEDIFF('LOA assignations'[LOA Signature date].[Date],'LOA assignations'[Greenlight Date LOA tracker].[Date],DAY)
 
And I just  select the Average option
 
romovaro_1-1702999191558.png

 

Then I want to calculate the Average of this month - the Total Average (Average YTD)

LOA Month Comp = CALCULATE(AVERAGE('LOA assignations'[LOA Sig date vs greenlight date])-14.52)
 
I need to be able to create a formula to substitute the 14.52)
Results inside green circle are the ones I need

 

romovaro_0-1702999111632.png

 

thanks,

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.