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
Anonymous
Not applicable

Measure of YoY with weeks

Could you help me creating a measure that calculates me the info of YoY based on weeks. I would need a new column in front of final revenue that indicates the revenue of past fiscal year  on the same quarter and week

Capture.PNG

12 REPLIES 12
Ashish_Mathur
Super User
Super User

Hi,

 

We must have a Calendar Table running from the first date appearing in the Date column of your Table to the last date in that column.  In the Calendar Table, there should also be a Week column.  Can you do that?  Also, what is your financial year (from which month to which month)?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi, Our Fiscal Calendar starts 1st November and ends 31 of October. Also our weeks are Sunday from Saturday and i need to split them in weeks 

Hi,

 

In the Calendar Table, can you create a weeek number column?  I will need that.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

This is the new file with date table"M_Dates" and with "Week"Column. Thanks for your help

 

LINK

Hi,

 

My formula in this file gives no result because the weeks/quarters and FY are not properly aligned between the M_dates table and the Date table.  Once you corect for that, my formula will work well.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

What do you mean when you said they no are aligned. This calendar Date is a customized table with our weeks, months and FY

Hi,

 

By that i mean that the week number and/or FY and/or quarter appearing against a particular date in the Data Table is not the same as the one on the Calendar Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Actually that is my problem because we have customized dates in our FY and that way is how they are set

Hi,

 

Actually we do not need to have FY, quarters and weeks at all in yout base data sheet.  These columns should only be in your Calendar Table.  The Actual date column in your base data sheet should bear a relationship to the Date column in the Calendar Table.  So it is important that the FY, quarters and weeks in the Calendar Table should be correct.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

Please try the measure below.

 

PY = 
CALCULATE (
    SUM ( 'table'[Revenue] ),
    FILTER (
        ALLSELECTED ( 'table' ),
        'table'[Year]
            = MAX ( 'table'[Year] ) - 1
            && 'table'[WeekNum] = MAX ( 'table'[WeekNum] )
            && 'table'[Qtr] = MAX ( 'table'[Qtr] )
    )
)

Here is the output.

 

output.PNG

More details, please refer to my test pbix which has been attached.

 

If you still need help, please share your data sample 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.
Anonymous
Not applicable

This is the Link  PBX

Anonymous
Not applicable

I tried that solution but It's not working. I can attach the PBX file but i dont see the option, if you teach me i can do it


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.