Forum Discussion

netanel's avatar
netanel
Post Prodigy
4 years ago
Solved

Connecting formulas

Hi All!

 

I need help connecting the next two formulas to one formula

 

Daily AVG for InApp =
CALCULATE([Net USD average per Day], 'Revenues DB'[GL] IN { "InApp" })
 
Daily AVG for RV =
CALCULATE([Net USD average per Day], 'Revenues DB'[GL] IN { "RV" })
 
Thanks for the helpers!
  • HI netanel ,

     

    I don't have anything to test the formula, so just wrote it based on my best judgement looking at your description.

    What error the formula is displaying?

    I am assuming you are creating a measure.

    Add more details as I can't help you to troubleshoot this way.

     

    See if this works:

    Net USD average per Day for InApp or RV =
    CALCULATE(
             [Net USD average per Day), 
             'Revenues DB'[GL] = "InApp" || 'Revenues DB'[GL] = "RV"
             )

     

    Thanks,

    Pragati

  • netanel 
    Remove ")" before the comma 🙂

     

     

     

    CALCULATE(
             [Net USD average per Day], 
             'Revenues DB'[GL] = "InApp" || 'Revenues DB'[GL] = "RV"
             )

     

     

     

     

11 Replies

  • Hi netanel ,

     

    Can you please accept the right solution to the thread?

    I guess the solution was provided by me, just that it had a typo because you didn't share much info at your end.

    I understand that DimaMD, suggested the typo correction, which I would have never done because the person who provides the solution on the thread first should take care of any such issues. Ideally I should have responded with the correction here but saw that it was always answered (which didn't seem to be right :))

    As a best practice on the forum, I always avoid jumping in a thread where someone on the forum is always engaged and trying to answer. If the thread is non-responsive for more than a day, then I try to jump in and help with the query. 🙂

    But please do accept the right solution to the thread, so atleast who has spent time in creating solution for your query gets the credit. 🙂

     

    Thanks,

    Pragati

  • HI netanel ,

     

    Not sure what do you mean by connecting two formulae?

    A little more detail would help here 🙂

     

    Thanks,

    Pragati

    • netanel's avatar
      netanel
      Post Prodigy

      Hi Pragati11 

       

      I'm trying to get them on the card
      But it should contain both RV and InApp
      I tried the following formula and it did not work

       

      Net USD average per Day for InApp or RV =
      CALCULATE(
          [Net USD average per Day],
          'Revenues DB'[GL] IN { "InApp", "RV" }
      )

       

      • Pragati11's avatar
        Pragati11
        Super User

        HI netanel ,

         

        You can write a measure as follows:

        Net USD average per Day for InApp or RV =
        CALCULATE(
                 [Net USD average per Day), 
                 FILTER(
                        'Revenues DB', 'Revenues DB'[GL] = "InApp" || 'Revenues DB'[GL] = "RV"
                       )
                 )

        Thanks,

        Pragati

  • DimaMD's avatar
    DimaMD
    Solution Sage

    Hi netanel 
    Try it
    Create a tablet:
    Table

    InApp
    RV

    Creates a measure

     

    1:
    Values = SELECTEDVALUE('Table'[Values])
    -------------------------------------- 
    2:
    Measure =
    VAR _fil = [Values]
    return
    SWITCH(
    TRUE(),
    _fil = "InApp", [Daily AVG for InApp],
    _fil = "RV", [Daily AVG for RV]
    )

     




    • netanel's avatar
      netanel
      Post Prodigy

      Hi DimaMD 

       

      I can not create such a side table

      I have  a large database

  • Daily AVG  =
    CALCULATE([Net USD average per Day]'Revenues DB'[GL] IN { "InApp", "RV" })
    Try this hope it works