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.
I would like to list in a matrix table the week start date for the previous 13 weeks and have that update based on current date. I don't want to have to select these dates manually using a slicer. Is there anyway to get these to list and then update based on current date? Thanks for your help.
Solved! Go to Solution.
Hi @cheid_4838
My sample:
You can create a measure as follows.
Measure =
VAR _1 = TODAY() -91
VAR _2 = WEEKDAY(_1, 2)
VAR _3 = _1 - _2 + 1
RETURN
IF(SELECTEDVALUE('Table'[Date]) >= _3 && SELECTEDVALUE('Table'[Date]) <= TODAY(), 1, 0)
Put the measure into the visual-level filters, set up show items when the value is 1.
Is this the result you expect?
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cheid_4838
My sample:
You can create a measure as follows.
Measure =
VAR _1 = TODAY() -91
VAR _2 = WEEKDAY(_1, 2)
VAR _3 = _1 - _2 + 1
RETURN
IF(SELECTEDVALUE('Table'[Date]) >= _3 && SELECTEDVALUE('Table'[Date]) <= TODAY(), 1, 0)
Put the measure into the visual-level filters, set up show items when the value is 1.
Is this the result you expect?
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@cheid_4838 You could create a DAX calculated table for this, or a Power Query query that calculates this. Something along the lines of:
Table 2 = GENERATESERIES( TODAY() - 13*7, TODAY(), 7)
Thanks Greg for the support. When I try your logic I get the below error message when I use it to create a new column. When I create a measure it won't allow me to put it in as a column or row.
Community Support Team _Yuliax,
I tried your logic and for some reason I get "0" as the result. Could that be a result of a problem with the date file that I use?
Is there logic that can be put in a columN?
Thanks again for the support and your help on this issue.
@cheid_4838 Did you create a calculated table or did you try that in a calculated column or measure?