Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
pelucapampa
Helper I
Helper I

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
v-chuncz-msft
Community Support
Community Support

@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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.