cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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?

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Same Period Last Year

@pelucapampa,

 

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

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 92 members 1,170 guests
Please welcome our newest community members: