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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
tkramer
Advocate I
Advocate I

Fiscal Calendar (4-4-5) Requirements DAX

Hey everyone,

 

I have been struggling for a few weeks trying to move my current reports from the Standard Calendar to our company's 4-4-5 Fiscal Calendar. 

 

In the attached PBIX file, I have 2023 and 2024 Fiscal Calendars loaded, I have shown what the problem is, and what the expected results should be.

 

These reports work fantastic on the Standard Calendar, but I can not get the correct measure for my 4-4-5!  Help would be extremely appreciated!  If you could try your measures in the PBIX file and then send back, that would be awesome.  

Here is the link to download from Google Drive:
https://drive.google.com/file/d/1rlCmeluJKptGdRL4FM6A49cocbJjSET3/view?usp=sharing

 

Order Value PY = 
    VAR _CY = SELECTEDVALUE( 'DIM-Date'[F Year] )
    VAR _PY = _CY - 1
    VAR _Result = 
        CALCULATE(
            [Order Value],
            'DIM-Date'[F Year] = _PY
        )

    RETURN
        _Result

 

1 ACCEPTED SOLUTION

Chat GPT and I figured it out 👏 I appreciate your help

Total Sales PY = 
VAR _PreviousYear = MAX('DIM-Date'[F Year]) - 1
VAR _CurrentDayOfYear = VALUES('DIM-Date'[F Day of Year])

RETURN
    CALCULATE(
        [Total Sales],
        FILTER(
            ALL('DIM-Date'),
            'DIM-Date'[F Year] = _PreviousYear &&
            'DIM-Date'[F Day of Year] IN _CurrentDayOfYear
        )
    )

.  It was the use of the VALUES function to create a virtual table and the IN function.   

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @tkramer ,

 

You can create a measure.

Measure 3 = 

     VAR _CY = MAX( 'DIM-Date'[F Year] )
     VAR _PY = _CY - 1
     VAR _Result = 
         CALCULATE(
             [Order Value],
             FILTER(ALL('DIM-Date'),'DIM-Date'[F Year] = _PY && 'DIM-Date'[F Day of Year] =MAX('DIM-Date'[F Day of Year]))
         )

     RETURN
         _Result

vtangjiemsft_0-1715740169127.png

Best Regards,

Neeko Tang

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

This Total on the bottom right does not sum correctly. It is only populating 1.2M.

Chat GPT and I figured it out 👏 I appreciate your help

Total Sales PY = 
VAR _PreviousYear = MAX('DIM-Date'[F Year]) - 1
VAR _CurrentDayOfYear = VALUES('DIM-Date'[F Day of Year])

RETURN
    CALCULATE(
        [Total Sales],
        FILTER(
            ALL('DIM-Date'),
            'DIM-Date'[F Year] = _PreviousYear &&
            'DIM-Date'[F Day of Year] IN _CurrentDayOfYear
        )
    )

.  It was the use of the VALUES function to create a virtual table and the IN function.   

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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