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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
gc27
Frequent Visitor

Previous 5 year average using slicer value

I am a beginner to PowerBi so please accept my igonrance if I am missing something simple, but I havent been able to solve this one yet.

 

I want to create a measure to work out the previous 5 year average using the measure 'deliberate fire sum' from the table 'deliberate fires.

I would like the previous 5 year average to be in reference to a fiscal year slicer [CFRS FY] which is in the format 2024/25. so that when 2024/25 is selected in the slicer, the result value is based on the average of 2019/20, 2020/21, 2021/22, 2022/23 and 2023/24.

 

I have been able to calculate this when locking the report to the fixed 6 year period within the report dataset;

Previous 5 year average = if(isblank(calculate(sum('Deliberate Fires'[Sum])/5, filter('Calendar','Calendar'[CFRS FY]<"2024/25"))),0,calculate(sum('Deliberate Fires'[Sum])/5, filter('Calendar','Calendar'[CFRS FY]<"2024/25")))
 
However, I would like the calculation to run based on a slicer selection for fiscal year and recalculate the previous 5 year average based on the selected fiscal year.
 
Any help would be hugely appreciated.
1 ACCEPTED SOLUTION
v-yifanw-msft
Community Support
Community Support

Hi @gc27 ,

Based on the information you have provided, can you provide some example data such as detailed data (without sensitive information) and your desired output. This would allow us to better address the problem you are having.

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

1 REPLY 1
v-yifanw-msft
Community Support
Community Support

Hi @gc27 ,

Based on the information you have provided, can you provide some example data such as detailed data (without sensitive information) and your desired output. This would allow us to better address the problem you are having.

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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