Forum Discussion
Time Period -1 year
Hello,
I need support with summarize the number of promotions in the selected time period (example: 08/2021-03/2022) comapred to the same period year ago (08/2020-03/2021). I'm using column with date "START PROMO" and column with the numer of promos "SUM".
Thank You in advance.
- Anonymous4 years ago
Hi emiliadgw ,
For the fields in the slicer, please use the date column from the calendar table.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
6 Replies
- Tahreem24Super User
emiliadgw You can below functions:
SAMEPERIODLASTYEAR - https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
DATEADD - https://docs.microsoft.com/en-us/dax/dateadd-function-dax
- emiliadgwRegular Visitor
Could You please help me with the formula? When i'm using SAMEPERIODLASTYEAR sum is only for one year, not for whole date range.
- AnonymousNot applicable
Hi emiliadgw ,
Create a calendar table, then use the date column to create a relationship between the fact tables, and then create two measures.
Please try:
the selected time period = SUM('START PROMO'[SUM])the same period year ago = CALCULATE([the selected time period],SAMEPERIODLASTYEAR('Calendar'[Date]))The PBIX file is attached for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
- emiliadgwRegular Visitor
Thank You very much. Unfortunatelly measure for 'year ago' shows the same number as 'selected period'.
My PBIX file with test data : https://we.tl/t-7RdeITJSz2
- AnonymousNot applicable
Hi emiliadgw ,
For the fields in the slicer, please use the date column from the calendar table.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
- emiliadgwRegular Visitor
Success! Thank You 🙂