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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
STaylor
Regular Visitor

Relative Value / Period Filtering for Calculate

Hi everyone,

 

I've tried really hard to find a solution to this problem but so far to no avail.  I'm fairly new to DAX overall and maybe I'm jumping in at the deep end, but previously I've always learned fastest through working examples of problems I'm trying to overcome for my work.

 

I'm looking to port over my business' KPI files from an old Excel sheet in to something a little quicker and smarter by using the Query Editor and Power Pivot in Excel (possible also Power BI later).  

I want to create a series of measures that sum sales and forecast for past periods so I can evaluate accuracy at various levels and over time.  We operate a 445 calendar so I'm using Year-Period Number rather than Dates.  

 

I'm really struggling to sum, for example, the last 3 periods.  I've found lots of examples online that use dates for periods but not so much values.  I've gathered so far it's likely I need to Index or Rank the year/periods as they are not consecutive (e.g. 202012 -> 202101), but from there I've not been able to find a combination of Calculate/Filter that works to sum the relative periods before.  With the measure I need to be able to pivot/filter to the various customer hierarchies, and with those measures I'm hoping to find it fairly simple to calculate accuracy etc.  

 

I've got a link here to a stripped back version of what I'm working with.  Any help would be massively appreciated!  Thank you in advance.  

https://1drv.ms/x/s!Aog5aBnl7MN2jTQ3BFvoY9ZHgMDH?e=scmEtS

 

Sara

 

1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @STaylor ,

 

Could not reach the file.

Could you please share the sample data in text format directly in this post?

 

 

 

 

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors