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
teflonreis
Frequent Visitor

dateadd in existing measure

Dear everyone

I would like to ask for your help.

 

I use a dax measure to visualise a bar chart. I want to shift the bar of March 5 month ahead of August and so forth using the dateadd function. 

Your help is greatly greatly appreciated.

 

teflonreis_0-1675930493969.png

 

My current measure is this:

forecast measure =
VAR forecast =
CALCULATE (
SUM ( Execution_forecast_tbl[weighted_effort_FOM] ),
FILTER (
Execution_forecast_tbl,
IF (
OR (
OR (
Execution_forecast_tbl[forecast type] = "MDB forecast",
Execution_forecast_tbl[forecast type] = "SF STR"
),
Execution_forecast_tbl[forecast type] = "SF TR"
),
Execution_forecast_tbl[timescale] > EOMONTH ( TODAY (), 0 )
)
)
)
RETURN
forecast

 

2 REPLIES 2
FreemanZ
Super User
Super User

hi  @teflonreis,

just add the DATEADD part like:

forecast measure =
VAR forecast =
CALCULATE (
    SUM ( Execution_forecast_tbl[weighted_effort_FOM] ),
    FILTER (
        Execution_forecast_tbl,
        IF (
            OR (
                OR (
                    Execution_forecast_tbl[forecast type] = "MDB forecast",
                    Execution_forecast_tbl[forecast type] = "SF STR"
                ),
                Execution_forecast_tbl[forecast type] = "SF TR"
            ),
            Execution_forecast_tbl[timescale] > EOMONTH ( TODAY (), 0 )
        )
    ),
    DATEADD(DateTable, 5, MONTH)
)
RETURN
forecast

 

or?

 

heeey

Thanks for the response.

 

What could I use in the first line of Dateadd for Datetable. I have a calender table. Also have a time column in the Execution_forecast_tbl[timescale].

Tried both so far with no success 😞

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.

Top Solution Authors