The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am trying to get a column at the end that shows the week to week variance based on this 14 day data. There is a filter in my report that grabs the most recent 14 day data so the dates will constantly be refreshing.
I tried using average and sum formulas using DATESINPERIOD or DATE(TODAY()-14) but it says I have either too few or too many arguments.
Thank you!
It's not really possible to debug your DAX code if you haven't provided any. If you have a date table already, then the most optimal way would be to use the DATESINPERIOD() function -
So your code might look something like:
CALCULATE(
[Your variance measure],
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-14,
DAY
)
)
I created a date table but my calculation keeps giving me this error: