cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
trisabiswas Regular Visitor
Regular Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: How to round up a calculated measure?

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

2 REPLIES 2
Community Support Team
Community Support Team

Re: How to round up a calculated measure?

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

trisabiswas Regular Visitor
Regular Visitor

Re: How to round up a calculated measure?

Solved !! Thanks Jimmy Smiley Happy