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 dateEnhance 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 create a dynamic date table in DAX with calcualted dates based on a in a filter selected reference date.
Let's say the selected reference date in the filter visual is 15/05/2022 based on the selected vale from column 'Filter_Date'[Date] in the date table.
Using this reference date, I want to calculate a date table with a few calcualted dates. To be included dates in the calculated table should simply be
selecteddate, selecteddate - 7 days, selecteddate-14 days etc.
Output table would look like the below
CALCULATED DATE
15/05/2022
08/05/2022
01/05/2022
....
Ultimatelty I want to use the column in a visual as the legend values.
Frank
I was hoping I can create a table rather then measures for each of the calculated days then.
Are you aware of any soltion for a table?
Hi @frankGB ,
Is this table a calculated table? If so, it is not possible. The calculation table is calculated when the model is refreshed, and user operations on the report do not affect the calculated table. (e.g. using a slicer)
Hope this will help you.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
yes, it is a calculated table. I could also create it as a static table in M and then probably do the Max and Min calculations based on a reference date to find the dates to be included in the visual.
I'll give that a try.
@frankGB , You have to create a measure and filter
calculate(sum(Table[Value]), filter(Table, Mod(Datediff(selectedvalue(Date[Date]), Date[Date], day),7) =0))
or
calculate(sum(Table[Value]), filter(Table, Mod(Datediff(selectedvalue(Date[Date]), Date[Date], day)+1,7) =0))
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 |
---|---|
71 | |
67 | |
51 | |
39 | |
26 |
User | Count |
---|---|
87 | |
54 | |
45 | |
40 | |
36 |