Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
agius
Regular Visitor

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!
1 ACCEPTED SOLUTION

@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.

Capture.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
ryan_mayu
Super User
Super User

@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)]))
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@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? 🙂

@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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@ryan_mayuI have the below and i need to have the (Total of Clicks / Total of Impressions) *100.

 

However, I cannot use the calculated fields as it takes the average instead of sum and then divide.  For the below, the answer would be 0.42%. But obviously, I have larger dataset.

 

Hope this helps 🙂

 

 

DummyData.PNG

@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.

Capture.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@ryan_mayu This is great! Thanks 🙂

 

This solves this issue. But I have similar situations where i need to multiply by a fixed number. I find it hard to believe how it is not possible to multiply by a fixed number. Maybe, I can just add a column with this fixed value and multiply my answer to it. I guess that might work. If you know of any easier solution please let me know 🙂

@agius 

Please provide the screenshots or demo file. Let me know what the expected result as well.

 

Thanks and BR

Ryan





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




AlB
Community Champion
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 

SU18_powerbi_badge

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.