Forum Discussion

DRJ1994's avatar
DRJ1994
Helper I
2 years ago

Division issue and circular dependancy error

Hi all,

 

I have run into a series of errors on a dashboard I am trying to produce.

 

I am trying to work out the occupancy rate of a small block of flats. I have the below visual:

 

The sum of daysinservice is how many days combined customers have spent in the accomodation in dates ranging from 2018 to 2023. The possible bed days is how many possible days the rooms could be occupied in the same date range. The date range is 25/01/2018 to today, there are 2149 days in that range, there are 6 rooms in the accomodation so to achieve this number I have done Daysinrange *6

 

The first issue I have, is when trying to divide daysinservice (DIS) by Possible Bed Days (PBD) I initially recieved the correct answer of 66%. However, when I moved the date slider around, to change the period that I was looking at, the values for DIS became 5000 for example, and the values for PBD became 9000, however the division was returning an answer of 128% - So I am not sure why it is going wrong.

 

The second issue, I have since removed the measure for the division, and when I am trying to add a new measure or column, I am getting the below error:

 

 

I have also attached an image of the work in progress dashboard as this may help with understanding what I am talking about.

 

Any tips or advice would be greatly appreciated.

Many thanks,

DRJ

 

 

5 Replies

  • DRJ1994, Seem like you are using one measure and one column.

     

    Create a new measure using both measures

     

    Aggregate the column in numerator

    • DRJ1994's avatar
      DRJ1994
      Helper I

      Thanks, sorry could you explain a bit more what you mean please? 

      • amitchandak's avatar
        amitchandak
        Super User

        DRJ1994 , To me seems like Days in service is column

         

        So new measures will be

         

        Occupany Rate = Divide(Sum(Customer Tracker [Daystaservice]), [Possible Bed Days],0)