Forum Discussion
DATEADD inside a measure
Hi everyone,
Trying to create a measure with the help of DATEADD but something is not working.
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 ) )- Anonymous3 years ago
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.
3 Replies
- daXtremeSolution 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 ) ) - AnonymousNot 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.
- AnonymousNot 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!