Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello everyone,
We are trying to create following measure with DAX:
Actived_Customer (1/0): customer is actived when YTD Sales are higher than LYTD Sales.
We have following measures created:
Please try formula similar to these for YTD and LYTD. Make sure you created a separate date dimension
Year = CALCULATE(SUM(table[column]),DATESYTD('Date'[Date Filer]))
Last Year = CALCULATE(SUM(table[column]),DATESYTD(dateadd('Date'[Date Filer],-12,MONTH)))
Year Sales = CALCULATE(TOTALYTD(sum(Sales[Sales Amount]),('Date'[Date Filer])))
Year Sales = CALCULATE(TOTALYTD(sum(Sales[Sales Amount]),dateadd('Date'[Date Filer].-12,month)))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Hi @amitchandak ,
Thanks for your help.
The problem we had was with the Actived_Customer measure, not with date measures.
Finally, we solved it changing measure applying FILTER function on Customer dimension instead of sales fact.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
18 | |
15 | |
11 | |
9 | |
9 |