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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Static Yearly Timelines

Hello, 

I have a sort of unique challenge that I am hoping to get some support on. I have a list of reporting deadlines which have static due dates. I would like to add these timelines to my PowerBI dashboard as a guideline for my team. The problem that I am facing is that some of the timelines extend slighly past the current year. For example a report is requested in September of 2023 but due by March 2024. This is a problem as I wanted to write a quick DAX query to go off of the current year but I cant seem to add or subtract a year to reflect these altered due dates. For context I have an excel sheet with the timelines that I am pulling into PowerBI then showing via a Gantt Chart. 

Any advice is welcome, I am fairly new to PowerBI and DAX so it is entirely possible that I am missing something. 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

I'd like to suggest you write a measure expression to check records and return flag, then use it on the 'visual level filter' to filter records who matched with conditions.

Sample formula: check the current report group of records if they include records that match with configured conditions.

Flag =
VAR msType = "Requested Date"
VAR YearFilter = 2024
VAR currDesc =
    SELECTEDVALUE ( Table1[Description] )
VAR List =
    CALCULATETABLE (
        VALUES ( Table1[Description] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [milestone] = msType
                && YEAR ( [Date] ) = YearFilter
        )
    )
RETURN
    IF ( currDesc IN List, "Y", "N" )

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Here is some dummy data, I split the chart into three columns one for milestones, one for description, and one for the date (Based off of the milestone). 

LiamNeufeld_0-1715094923310.png

The outliers occur when the dates extend past 2024. My initial thought was to write a dax query to just go off of the current year when viewing as these timelines are repeated yearly. However with the outliers this approach does not work. 

Anonymous
Not applicable

HI @Anonymous,

I'd like to suggest you write a measure expression to check records and return flag, then use it on the 'visual level filter' to filter records who matched with conditions.

Sample formula: check the current report group of records if they include records that match with configured conditions.

Flag =
VAR msType = "Requested Date"
VAR YearFilter = 2024
VAR currDesc =
    SELECTEDVALUE ( Table1[Description] )
VAR List =
    CALCULATETABLE (
        VALUES ( Table1[Description] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [milestone] = msType
                && YEAR ( [Date] ) = YearFilter
        )
    )
RETURN
    IF ( currDesc IN List, "Y", "N" )

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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