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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yiannis_CFO
New Member

Hotel occupancy rates help???

hello,

 

I would kindly ask someone's help as i am confused....

I used the following formula to receive the average rate per month on my matix but it gives me the same annual value for all months ......

 

DIVIDE(sumx('Table';'Column'[1]);sumx('Table';'Column'[2]);0)

 

column 1 is sold rooms per day

column 2 is available rooms per day

 

 

what am i doing wrong????

 

thanks in advance

 

 

1 ACCEPTED SOLUTION

You should create a measure not a calculated column.

Using a colum it will sum values of percentage and not calculate percentage.

Regards
Mfelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

8 REPLIES 8
MFelix
Super User
Super User

Hi @Yiannis_CFO,

are your tables related by a calendar table or similar?

You should have the tables related by calendar table and the use the measure.:

DIVIDE(sum('Table'[Column'1]);sum('Table'[Column'2]);0)

Use the month on calendar table for your visual.

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



hello Mfelix,

 

in the same table there is column with AUTOCALENDAER from 01/01/2017 up to 31/12/2018

 

i need to create another table????

If the columns are on the same table no need to create a calendar. Use the formula as I wrote and check if it works.

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



unfortunately it continues to give me as result the annual total percentage and not the monthly one....(((

 

I cannot understand what is going wrong

What column are you using for month context?

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Table.pngVisual result.png

You should create a measure not a calculated column.

Using a colum it will sum values of percentage and not calculate percentage.

Regards
Mfelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks a lot ! now i understood 

 

I thought that it could be done on table and i lost a lot of time

 

Once again Thanks!

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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