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

DATEADD inside a measure

Hi everyone,

 

Trying to create a measure with the help of DATEADD but something is not working. 

 
TEST Orders =
calculate(DISTINCTCOUNT(
    'Export'[Id]),
 FILTER('Export ','Export'[CaseTyp] = "X"),
   FILTER('Export ','Export'[Closed] = "Confirmed"),
    FILTER(''Export ','Export'[Status]  <> "Pre"),
    DATEADD('Export'[DeliveryDate],+30,DAY))
 
Regards,
Niclas
2 ACCEPTED SOLUTIONS
daXtreme
Solution Sage
Solution Sage

Of course it's not working because you have not taken the effort to get familiar with the time-intel functions and how they work in Power BI. Please head over to http://dax.guide/dateadd and carefully study the documentation. Then, build a correct model (meaning: star-schema).

 

This measure should work fine after you've understood how the model should be structured:

TEST Orders =
CALCULATE(
    DISTINCTCOUNT( 'Export'[Id] ),
    KEEPFILTERS( 'Export'[CaseTyp] = "X" ),
    KEEPFILTERS( 'Export'[Closed] = "Confirmed" ),
    KEEPFILTERS( 'Export'[Status]  <> "Pre" ),
    DATEADD(
        'Calendar'[Date],
        30,
        DAY
    )
)

 

View solution in original post

Anonymous
Not applicable

Hi  @Anonymous ,

 

Is your problem solved, if it is solved, you can mark the correct answer, if not, can provide detailed information, we can help you better.

 

Best Regards,

Liu Yang

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi! 

Thanks for the help! I will read the documentation. Regarding the star-schema is already in place, just imported a table and wanted to try this first! 

Anonymous
Not applicable

Hi  @Anonymous ,

 

Is your problem solved, if it is solved, you can mark the correct answer, if not, can provide detailed information, we can help you better.

 

Best Regards,

Liu Yang

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

daXtreme
Solution Sage
Solution Sage

Of course it's not working because you have not taken the effort to get familiar with the time-intel functions and how they work in Power BI. Please head over to http://dax.guide/dateadd and carefully study the documentation. Then, build a correct model (meaning: star-schema).

 

This measure should work fine after you've understood how the model should be structured:

TEST Orders =
CALCULATE(
    DISTINCTCOUNT( 'Export'[Id] ),
    KEEPFILTERS( 'Export'[CaseTyp] = "X" ),
    KEEPFILTERS( 'Export'[Closed] = "Confirmed" ),
    KEEPFILTERS( 'Export'[Status]  <> "Pre" ),
    DATEADD(
        'Calendar'[Date],
        30,
        DAY
    )
)

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.