Showing results for 
Search instead for 
Did you mean: 
pelucapampa Regular Visitor
Regular Visitor

Same Period Last Year

Hi !!

I've a Page with Relative Date filter.

Into one graphic I've Hotel Occupancy Measure (I've paste Measure Code)


OcupacionMensual = 
var pHO = CALCULATE(SUM(EstadGeneral[HO]), 'Date'[Date])
var pHA = CALCULATE(sum(EstadGeneral[HA]), 'Date'[Date])
var pRR = DIVIDE(pHO, pHA) * 100
VAR result = INT(ROUND(pRR,0))
return result

 Into Other Measure, I've the same calculation, but Same Period Last Year.


OcupacionMensualSPLY = 
var pHO = CALCULATE(SUM(EstadGeneral[HO]), DATEADD('Date'[Date],-1,1,YEAR))
var pHA = CALCULATE(sum(EstadGeneral[HA]), DATEADD('Date'[Date],-1,1,YEAR))
var pRR = DIVIDE(pHO, pHA) * 100
VAR result = INT(ROUND(pRR,0))
return result

My problem is when I put two measures into the same graphic, I can't see into the same graph, because the graph are filter with Relative date.


It's possible to solve that and see into the same graph both measures?

Community Support Team
Community Support Team

Re: Same Period Last Year



Instead of relative date filter, you may add filter arguments in CALCULATE as well.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 238 members 2,264 guests
Please welcome our newest community members: