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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to round up a calculated measure?

I am calculating sales for this day vs last day. I want to calculate the percentage in change. So, I created a the following measure :

 

Change = ((([Total Sales] - [Total Sales Last Day])/[Total Sales Last Day])*100) & "%"

 

I want to round up the result to last 2 digits. I tried using INT and ROUND functions, but they dont work. Can anybody suggest how can i round up the value?

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi trisabiswas,

 

Based on your description, you want measure [change] to be a percentage, right?

 

To achieve your requirement, please use DAX formula below:

 

Change = ([Total Sales] - [Total Sales Last Day])/[Total Sales Last Day]

 

Then click on [change] and click Modeling->Format->Select Percentage->Set decimal places to 2.

2.PNG

 

The result is like below and you can refer to my sample PBIX file: https://www.dropbox.com/s/t8ndcw6rt0qcfh5/For%20trisabiswas.pbix?dl=0

1.PNG

 

Best Regards,

Jimmy Tao

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi trisabiswas,

 

Based on your description, you want measure [change] to be a percentage, right?

 

To achieve your requirement, please use DAX formula below:

 

Change = ([Total Sales] - [Total Sales Last Day])/[Total Sales Last Day]

 

Then click on [change] and click Modeling->Format->Select Percentage->Set decimal places to 2.

2.PNG

 

The result is like below and you can refer to my sample PBIX file: https://www.dropbox.com/s/t8ndcw6rt0qcfh5/For%20trisabiswas.pbix?dl=0

1.PNG

 

Best Regards,

Jimmy Tao

Hi, I have similar issue, but I want only 1 value after decimal and in my case, it's rounding up 94.96 to 95% how can I show only 94.9% ?? I used 1 decimal place under formatting tab. Please help, it's urgent!

Anonymous
Not applicable

Solved !! Thanks Jimmy 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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