The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |