Forum Discussion

agius's avatar
agius
Regular Visitor
6 years ago
Solved

Creating a Measure by using a fixed value

Hi,

 

I need to create a simple measure but cannot seem to make it work. I need to divide 2 columns and then multiply the answer by 100. So it looks something like this:

 

CTR = (Clicks / Impressions) * 100

 

So far I managed this much

 

CTR =
(DIVIDE(
    SUM('Adform - Daily'[Clicks]),
    SUM('Adform - Daily'[Impressions)]))
)
 
Any suggestions?
 
Thanks!
  • agius 

     

    Finally, I figured out your issue.

    If you want to change the decimal number to percentage, you can't multiple 100 in the coding. That will make the result be larger.

    You need to choose the measure and change to percentage format.

8 Replies

  • AlB's avatar
    AlB
    Community Champion

    Hi agius 

    So what is the problem exactly with the measure that you put together? You just need to multiply by 1000 but other than that it looks fine, given the info provided.

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

  • agius

    Did you get an error message or not get the expected result?

    The brackets in your formula is not correct. Is that a typo error?

     

    CTR =
    (DIVIDE(
    SUM('Adform - Daily'[Clicks]),
    SUM('Adform - Daily'[Impressions)]))
    )

    • agius's avatar
      agius
      Regular Visitor

      ryan_mayu Your suggestion helped! However, I still need to multiply by 100. I do not receive any error but I do not have the expected results.

       

      AlB Now, I have this

       

      CTR =
      (DIVIDE(
      SUM('Adform - Daily'[Clicks]),
      SUM('Adform - Daily'[Impressions)]))
      ) *100

       

      But it doesn't work. Any suggestions? 🙂

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        agius 

         

        Could you please provide some screenshots or demo file?

        What's your expected results and what result you are getting now?

         

        Thanks and BR