Forum Discussion

dspvarma16's avatar
dspvarma16
Frequent Visitor
1 year ago

Measure for the Slicers difference

I have 4 slicers: Start Date, End Date, Start Time in Hours, and End Time in Hours.

 

I created the following two measures using these slicers, which essentially calculate the difference between the end time and start time:

 

  1. Difference = ('End Date'[End Date] - 'Start Date'[Start Date]) * 1440
  2. Difference_Hours = ('End Time'[End Time] - 'Start Time'[Start Time]) * 60

     

 

I then created a third measure by adding the two measures:

 

Total Difference in Minutes = [Difference] + [Difference_Hours]

 

However, when I use this measure in a column on a different sheet, it returns a blank value.

For example, in my scenario, the Total Difference in Minutes = 5,700 and avg Minutes per Booking = 43,200. Therefore, the projected booking should be 0.131944. Here 5,700 is from the Fund Optimization sheet and Avg minutes per booking is from Avg minutes per booking column of the Fund optimization workings sheet.

 

Here’s the measure I used for projected bookings, which is returning a blank value:

Projected Bookings =

VAR _1 = [Total Difference in Minutes]

VAR _2 = [Avg mins per Booking]

RETURN

DIVIDE(_1, _2, 0)

 

 

Can someone help me understand the reason for this blank value and suggest a solution?