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 dateJoin 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.
Hi,
I would like to compute SAMEPERIODLASTYEAR() to understand YoY growth of my revenue numbers. However, my data model doesn't have a date column but it has a fiscal_quarter column which is of "Text" data type. Since SAMEPERIODLASTYEAR() requires a date column as an input how do I go about it?
I tried adding a column in my data "quarter_start_date" (a date data type) which corresponds to each fiscal_quarter value and compute SAMEPERIODLASTYEAR() based on quarter_start_date, but when i use fiscal_quarter column in the slicer to fiter our the quarter it doen't give me the last year data. Please let me know. Thanks.
Solved! Go to Solution.
hi @kev_sav
not sure if i fully get you, please try plot a visual with a measure like:
Measure =
VAR MaxDate =
MAX(data[fiscal_quarter_date])
RETURN
CALCULATE(
SUM(data[revenue]),
data[fiscal_quarter_date]=EDATE(MaxDate, -12),
ALL(data)
)
tried to verify with expanded data like:
it worked like:
hi @kev_sav
not sure if i fully get you, please try plot a visual with a measure like:
Measure =
VAR MaxDate =
MAX(data[fiscal_quarter_date])
RETURN
CALCULATE(
SUM(data[revenue]),
data[fiscal_quarter_date]=EDATE(MaxDate, -12),
ALL(data)
)
tried to verify with expanded data like:
it worked like:
Thanks a lot. This solution worked!
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 |
---|---|
17 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |