March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a date table called 'Calendar' with this shape:
Date | Date Month | Site Uptime |
1/1/2019 | January 2019 | 99% |
3/5/2019 | March 2019 | 100% |
... | ... | ... |
I would like to make a report page with a dropdown selection for the month above and a bar graph with a dynamic x axis that shows all the months up to the month selected in the dropdown with the average site uptime for the date in the y axis.
I attempted to do so by making a new table 'Calendar Month Selection' with the following code, but it didn't work:
Calendar Month Selection =
VAR lDate = MAXX('Calendar', 'Calendar'[Date])
RETURN
CALENDAR(DATE(2017, 1, 1), ldate)
Is this possible? If so, how could I make it work?
Solved! Go to Solution.
You dont have to create a date column again.
You can create a measure up to the selected month. See formula below as an example:
Measure =
CALCULATE (
SUM ( Sheet1[Values] ),
FILTER (
ALL( Sheet1[Month] ),
Sheet1[Month] <= SELECTEDVALUE ( Sheet1[Month] )
)
)
@jsup , if you are trying to control the max date of the calendar using slicer that is not possible. Slicer value can not be used in a new table or column.
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
You dont have to create a date column again.
You can create a measure up to the selected month. See formula below as an example:
Measure =
CALCULATE (
SUM ( Sheet1[Values] ),
FILTER (
ALL( Sheet1[Month] ),
Sheet1[Month] <= SELECTEDVALUE ( Sheet1[Month] )
)
)
Thanks for your response!
Unfortunately, this doesn't work. Selecting the month in the dropdown simply filters out the data to the month selected.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |