Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to use the 'MonthNameLong' and 'Year' from a disconnected table but I don't know the best practice and/ or simplest way. The end user will select both to act as the end date, and another slicer has YTD & MTD. This last day of that particular period (e.g. December 2010 = 12/31/2010 or 'EOMonth') is needed to dynamically filter the dates of a Calendar Table.
Disconnected Table:
Example:
User selects Month Slicer 1: 'December' and Year Slicer 2: '2010' and Period Slicer 3: 'YTD'
SWITCH Function picks the appropriate formula->
How do I write this formula to capture YTD December 2010? ->
@shubuya - I think you should be slicing on the date table, instead of a disconnected table. The MTD or YTD will alter the filter context, so that you will end up with the appropriate dates for your calculation.
I forgot to mention a critical part of why I didn't use the Calendar Table for the slicers:
I was not able to get this formula to create a line chart with the running totals (filtered YTD December 2010):
@shubuya - Since you are considering values from previous years, you don't want to use a YTD calculation. You're looking for something more like:
Departures Running Total = var displaydate = MAX('Calendar'[Date]) return CALCULATE( <Count Measure (Not YTD)>, 'Calendar'[Date] <= displaydate )
Thanks for your help - I think I am close, but when I use the formula you provided the chart is not scaling to show the dates 1/1/2015 to 12/31/2015. How do I edit your formula to only show that date interval?
@shubuya - The Year and Month for the Slicers and for the Line chart all need to come from the Date table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |