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
anix
Regular Visitor

calculate value between tables

Hi Guys

 

Hope you can help me out with this one since i think it is quite a essential feature to be able to calculate. I can solve it in excel but it takes a fair share of time and files get pretty heavy.

I have some sku's with different colours ex. 192 SKU's with the colours STD.

I will like to know how big a % NO in table two is buying of the total number of SKUS with the colours STD and display it in table two.

So 75/195 in % next to the 75.

 

Thanks for your support!

 

anix_0-1684155058613.png

 

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

Hi @anix ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1684290259331.png

Please try:

Percentage = 
var _a = SUM('Table'[SKU])
var _b = CALCULATE(SUM('Table'[SKU]),FILTER(ALL('Table'),[Colour]=SELECTEDVALUE('Table'[Colour])))
return DIVIDE(_a,_b)

Final output:

vjianbolimsft_1-1684290293284.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @anix ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1684290259331.png

Please try:

Percentage = 
var _a = SUM('Table'[SKU])
var _b = CALCULATE(SUM('Table'[SKU]),FILTER(ALL('Table'),[Colour]=SELECTEDVALUE('Table'[Colour])))
return DIVIDE(_a,_b)

Final output:

vjianbolimsft_1-1684290293284.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.