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
Yaswanth1997
Regular Visitor

Calculate Same Period Last Year & Previous Period sales by Using Fiscal Year - quarter Combination

Hii , 

 

I Had Created a Fiscal Calender table with Fiscal Year-quarter Combination Column

& I had a sales Column in my Master data Table 

I want to get Same period Last year & previous period sales by Using Fiscal Year-Quarter Combination

 

can i get a help from Anyone Please

 

 

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

I assume starting month of the fiscal year is March.

I am not sure how your calendar table is structured, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1682852144214.png

 

Jihwan_Kim_1-1682852517153.png

 

 

 

Sales total: = 
SUM( Sales[Sales] )

 

 

 

Sales same period last year: = 
CALCULATE (
    [Sales total:],
    OFFSET (
        -4,
        ALL ( 'Calendar'[Fiscal Year-Quarter], 'Calendar'[FQuarternYear] ),
        ORDERBY ( 'Calendar'[FQuarternYear], ASC )
    )
)

 

 

 

Sales previous period: = 
CALCULATE (
    [Sales total:],
    OFFSET (
        -1,
        ALL ( 'Calendar'[Fiscal Year-Quarter], 'Calendar'[FQuarternYear] ),
        ORDERBY ( 'Calendar'[FQuarternYear], ASC )
    )
)

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

Thanks a Lot Sir , 

 

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I assume starting month of the fiscal year is March.

I am not sure how your calendar table is structured, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1682852144214.png

 

Jihwan_Kim_1-1682852517153.png

 

 

 

Sales total: = 
SUM( Sales[Sales] )

 

 

 

Sales same period last year: = 
CALCULATE (
    [Sales total:],
    OFFSET (
        -4,
        ALL ( 'Calendar'[Fiscal Year-Quarter], 'Calendar'[FQuarternYear] ),
        ORDERBY ( 'Calendar'[FQuarternYear], ASC )
    )
)

 

 

 

Sales previous period: = 
CALCULATE (
    [Sales total:],
    OFFSET (
        -1,
        ALL ( 'Calendar'[Fiscal Year-Quarter], 'Calendar'[FQuarternYear] ),
        ORDERBY ( 'Calendar'[FQuarternYear], ASC )
    )
)

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thanks a Lot Sir , 

 

Hii Power BI Community , 

Please Help me Out of this Scenario, 

 

I had a data which includes address Field & Establisted date 

& the Requirement was i want to show all addresses in Global map based on Play Slicer 

( Which Means the Addresses need to be Shown based on date )

 

But the Problem is Play axis will filtering One date to another date 

 

But My Requirement was i want 

 

( Eg: if i have year : 2020 to 2023 then from 2020 to cummulatively the addresses need to be shown in Global map )

 

anyone please help me out this case How to do ????

 

 

 

 

data.png

 

 

map.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors