Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
Hi. I am trying to display both the current and previous year's sales with a year slicer like so:
I am able to dynamically change the year perperly. Though, I want to be able to select the stores status was well ( 'Stores'[Status] ) and my measure for the previous year wont allow this since I am using an ALL() in the filter epxression. Below are both my measures:
Solved! Go to Solution.
Hi, @Anonymous , you might want to specify column(s) in ALL() function to remove filter(s) on the assigned columns. I think this might do the trick.
TEST, YTD LY =
CALCULATE (
[TEST, YTD],
DATEADD ( Sales[Date], -1, YEAR ),
ALL ( Sales[Date] )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi, @Anonymous , you might want to specify column(s) in ALL() function to remove filter(s) on the assigned columns. I think this might do the trick.
TEST, YTD LY =
CALCULATE (
[TEST, YTD],
DATEADD ( Sales[Date], -1, YEAR ),
ALL ( Sales[Date] )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks so much! It now works as attended.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |