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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
angadarora18
New Member

Help with measure divison

Hi all, 

I am very new to PowerBI and am looking for some assistance. I am working on a dashboard that was already created so I am unfamiliar with the foundations of it.

 

I have two visual cards of data (shipment quantity and delivery quantity) and am trying to divide the two to get a percentage value in another visual card, however the division I am doing does not get me a proper value. Any ideas for what I can do? Any help would be much appreciated!

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

Hi @angadarora18,

 

Not sure about how your data tables look like and how you count shipment quantity and delivery quantity.

I create some sample data for illustration.

vcazhengmsft_0-1652682853900.png

 

And count by these two measures.

shipment quantity = CALCULATE(COUNT('Table'[Order]),FILTER('Table','Table'[Status]="shipment"))
delivery quantity = CALCULATE(COUNT('Table'[Order]),FILTER('Table','Table'[Status]="delivery"))

 

Then, just take them to do the division.

PercentValue = [shipment quantity]/[delivery quantity]

 

The result looks like this. And sometimes, you need to take attention to the format of the result, especially for the decimal data, you may need change the numbers of decimal places shown to see the correct result.

vcazhengmsft_1-1652682853903.png

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how your tables look like, the relationships you create for them and how you create these two count measures. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

2 REPLIES 2
v-cazheng-msft
Community Support
Community Support

Hi @angadarora18,

 

Not sure about how your data tables look like and how you count shipment quantity and delivery quantity.

I create some sample data for illustration.

vcazhengmsft_0-1652682853900.png

 

And count by these two measures.

shipment quantity = CALCULATE(COUNT('Table'[Order]),FILTER('Table','Table'[Status]="shipment"))
delivery quantity = CALCULATE(COUNT('Table'[Order]),FILTER('Table','Table'[Status]="delivery"))

 

Then, just take them to do the division.

PercentValue = [shipment quantity]/[delivery quantity]

 

The result looks like this. And sometimes, you need to take attention to the format of the result, especially for the decimal data, you may need change the numbers of decimal places shown to see the correct result.

vcazhengmsft_1-1652682853903.png

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how your tables look like, the relationships you create for them and how you create these two count measures. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

tackytechtom
Super User
Super User

Hi @angadarora18 ,

 

It is hard to tell what the issue is. You might wanna share some data and screenshots of the error. But I'll give it shot anyway.

 

If each of the visual is using a measure, I'd write the new "percentage" measure like this:

DivideMeasure = 
DIVIDE ( [Measure1], [Measure2] )

 

Afterwards you can switch the Format of the measure by clicking on it in the field pane and then under Measure tools you can change the Format to Percentage.

 

Does this help? 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors