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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
suzsword
Frequent Visitor

Calculating a yearly average and displaying in a table that is filtered to show the current day

I need to be able to show an average per year per group and show in a table that has been filtered to only show the current day. 

 

My measure is 

YTD (BOPD) = calculate(average(Actuals[bopd]),
    filter( all(Actuals), Year(Actuals[full_date])) = year(today())))

The resulting table (which has a visual level filter of showing only today) shows a single value for the YTD figure across all of the groups. I need an average calculated by each group. 

 

filteredtable.PNG

 

Its as if the calculation is ignoring the relationship and I dont know how to get it to use it. 

 

Relationship.PNG

 

Any help would be appreciated.

 

Susan

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

Hi @suzsword ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share your data sample as table format and your desired output so that I could have a test 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.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @suzsword ,

 

I'm not sure if my formula will work as I don't have reproduce your scenario, please try the formula below.

 

YTD (BOPD) =
CALCULATE (
    AVERAGE ( Actuals[bopd] ),
    ALLEXCEPT ( Actuals, 'Actuals'[GroupName] ),
    FILTER ( ALL ( Actuals ), YEAR ( Actuals[full_date] ) = YEAR ( TODAY () ) )
)

If you still need help, please share your data sample which could reproduce your scenario and your desired output so that we could help further 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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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