Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm trying to create a visualisation that goes back 12 months from the selected date in a slicer.
I'm working off this video - https://www.youtube.com/watch?v=d8Rm7dwM6gc
My Code so far is:
TRI P12M =
VAR ReferenceDate = MAX ( 'Date'[Date] )
VAR PreviousDates =
DATESINPERIOD (
'Previous Date'[Date],
ReferenceDate,
-12,
MONTH
)
VAR Result =
CALCULATE(
MAX(
'DataFreqRates'[TRI Month]),
PreviousDates,
USERELATIONSHIP ( 'Date'[Date], 'Previous Date'[Date])
)
RETURN
Result
I can follow what the video is saying and what it is trying to do, but I am getting an error - MdxScript(Model) (18, 5) Calculation error in measure 'DataFreqRates'[TRI P12M]: an invalid numeric representation of a date value was encountered.
Which I think is saying I am trying to sum a date, but I'm not sure how or why.
Suspect its cause I'm only new to DAX and am missing something basic.
More Info -
TRI Month is basically a performance metric for the end of the month.
DataFreqRates is the table that calculates several scores.
Can someone point me in the right direction?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |