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
trdoan
Helper III
Helper III

% GT of each month for each category using different tables

Hi everyone,

 

Here is my data:

 

Sample table:

StoreCatergory
1A
2B
3C

 

Full Data table:

Store NameProduct CatergoryQuantityPosting Date
1A40July 7, 2018
1B400June 22, 2018
2C15July 9, 2018
5A15March 5, 2018
1E150February 20, 2018
4D45January 29, 2018
1E65August 31, 2018
2C95April 10, 2018
1C145April 3, 2018
4B145January 3, 2018
5B65January 3, 2018
1B145April 3, 2018
4A150January 3, 2018
5C155January 3, 2018
2D350January 3, 2018
1D155May 3, 2018
5A20January 3, 2018
4C25January 3, 2018
3B260January 3, 2018
3C65January 3, 2018
2C65January 3, 2018
3B60January 3, 2018
2A10May 29, 2018
3E15April 18, 2018

 

I know how to do percentage formula where all data used is from the same table, however, my Category column (containing A, B, C,..) is from Sample table whilst all numeric data used for calculation is from Full Data table (The 2 tables are in a 1-many relationship, linked by Category & Product Catergory columns).

 

I only want to know the % grand total of each category in each month from the Sample table, using data from the Full Data table which looks like this:

 

 % Grand Total = (Average Quantity of category A in month 1 / Average Quantity of all categories in month 1)*100

 

Month ABCTotal
Jan25%25%50%100%
Feb10%45%45%100%
Mar10%10%80%100%
Apr60%40%0%100%
May0%0%100%100%
Jun15%65%20%100%
Jul90%5%5%100%
Aug90%10%0%100%
Sep80%15%5%100%
Oct10%90%0%100%
Nov0%0%100%100%
Dec0%0%100%100%

 

Can anyone please show me how I can create such measure? Thank you so much!

2 REPLIES 2
v-danhe-msft
Employee
Employee

Hi @trdoan,

Based on your data, I could not figure out how to calculate the number from your formula:

% Grand Total = (Average Quantity of category A in month 1 / Average Quantity of all categories in month 1)*100

For example, in May, your data table is like:

1.PNG

It seemed the category A is 100%(if your formula about all categories just includes 'A', 'B' and 'C').

But with your desired result, it seemed 'C' is 100%:

1.PNG

Could you please offer me more information about it?

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-danhe-msft,

 

The % table was merely a quick demonstration for what I'd like to achieve and it has no relation to the data whatsoever. Sorry for this confusion!

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.