Forum Discussion
kev_sav
3 years agoFrequent Visitor
SAMEPERIODLASTYEAR based on text column
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 "...
- 3 years ago
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:
FreemanZ
3 years agoSuper User
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:
- kev_sav3 years agoFrequent Visitor
Thanks a lot. This solution worked!