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
maj
Helper I
Helper I

Dividing 2 Measures

Hello,

 

I've created 2 measures that are used in 2 separate visuals.  I want a 3rd visual that shows me measure 1 divided by measure 2. Please see document posted here for futher information:  https://drive.google.com/file/d/1vD8uMDx3YvVtRFUkGwAXFW-bo67PO0RM/view?usp=sharing 

 

Thank you.

-maj

4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@maj 
You may first try add the Week field to the measure 3 visual. 

Could you share a sample pbix, some test is required for us to figure it out.

Regards 
Paul

Here is the link to a PBIX sample file:

 

https://drive.google.com/file/d/13Gvuv0wi7h9epAPpsu47nJnx8PTeQhJZ/view?usp=sharing

 

Perhaps my measure 3 isn't working as expected because in one query the product is ITEM-SKU-CDTY-DESC and in the other query it's ITEM-SCN-CDTY-DESC?

harshnathani
Community Champion
Community Champion

Hi @maj ,

 

Yes, you are right. Because of this the values are not coming as expected.

 

When you pull 52 Week Consumption against ITM_SKU_CDTY_DESC, you can see how the values change.

 

1.jpg

 

This is thus giving you the wrong results.

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

I created a relationship between product types in the 2 different tables and the calculation worked correctly.  Now I'm trying to add in location so I can see the OOS% by product type, by location.  Since I can't have 2 active relationships between the same 2 tables, I tried using the USERELATIONSHIP function, but I get the following error in my visual:

 

Error Message:
There are ambiguous paths between 'Sherlock Division Matrix' and 'OOS By Division': 'Sherlock Division Matrix'->'OOS By Division' and 'Sherlock Division Matrix'->'OOS By Division
 
Again, here is link to sample PBIX file.  Any help would be greatly appreciated!!
 
 
Thank you,
-maj

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.