Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I have a simple data model. It includes a fact table (Tickets) related to a date table (Calendar) based on the creation date of the ticket.
I want to measure the following:
I'm struggling to write a Dax for measures 2 & 3 that will dynamically adjust based on the slicer selection (date). Being able to use a slicer to determine the time period is a must have, however I'm open to different options (single date slicer vs multiple date slicers).
Is there any way to achieve this YoY comparison dynamically using slicer?
Thanks in advance.
Solved! Go to Solution.
Hi,
Assuming slicers have been created from the Calendar Table, try this measure
Measure = calculate([your measure],sameperiodlastyear(calendar[date]))
Hope this helps.
Hi,
Assuming slicers have been created from the Calendar Table, try this measure
Measure = calculate([your measure],sameperiodlastyear(calendar[date]))
Hope this helps.
Ughh I overcomplicated my Dax with a bunch of filters + used the wrong date columns. Should have known better. Thanks for the reply Ashish, sometimes I need to be reminded that simple can be better.
You are welcome.
@pdory check this video on my YT channel: Explore SAMEPERIODLASTYEAR & PARALLELPERIOD Time Intelligence functions? Are they same? - Part 5 - Y...
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks for the reply and video. I just subscribed to your channel.
Cheers!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
87 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |