none
Can't divide this expression!! RRS feed

  • Question

  • This expression is giving me problems.  I need to divide the whole thing by "/Sum(Fields!CurrentRoomNights)"

    =Sum(VAL(IIF(Fields!BusinessType.Value = "Transient", (Fields!TotalAverageLOS.Value * Fields!CurrentRoomNights.Value), 0)))

    Can someone help me?

    Tuesday, February 13, 2018 6:10 PM

Answers

  • =IIf(Sum(val(Fields!CurrentRoomNights.value)) > 0 ,Sum(IIF(Fields!BusinessType.Value = "Transient", (val(Fields!TotalAverageLOS.Value) * val(Fields!CurrentRoomNights.Value)), 0))/IIf(Sum(val(Fields!CurrentRoomNights.value)) > 0 ,Sum(val(Fields!CurrentRoomNights.value)),1),0)


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    • Marked as answer by soldierfc Tuesday, February 13, 2018 7:03 PM
    Tuesday, February 13, 2018 6:42 PM

All replies

  • like this?

    =Sum(IIF(Fields!BusinessType.Value = "Transient", (val(Fields!TotalAverageLOS.Value) * val(Fields!CurrentRoomNights.Value)), 0))


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Tuesday, February 13, 2018 6:26 PM
  • I can get to this point, but how do I get this divided out by "/Sum(Fields!CurrentRoomNights)"?
    Tuesday, February 13, 2018 6:33 PM
  • =IIf(Sum(val(Fields!CurrentRoomNights.value)) > 0 ,Sum(IIF(Fields!BusinessType.Value = "Transient", (val(Fields!TotalAverageLOS.Value) * val(Fields!CurrentRoomNights.Value)), 0))/IIf(Sum(val(Fields!CurrentRoomNights.value)) > 0 ,Sum(val(Fields!CurrentRoomNights.value)),1),0)


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    • Marked as answer by soldierfc Tuesday, February 13, 2018 7:03 PM
    Tuesday, February 13, 2018 6:42 PM