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
Anonymous
Not applicable

Percentage of category and subcategory agints a specific category

Hi;

 

I want to calculete a percentage of my category and subcategories against the total sum of one of my categories. Any idea?

 

Best regards

1 ACCEPTED SOLUTION

Try Below

Measure = DivIDE(SUM(Source[Value]),CALCULATE(sum(Source[Value]),filter(all(Source),Source[Category]= "Musica")))

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

 

 

View solution in original post

5 REPLIES 5
remyacholayil
Frequent Visitor

@AnkitBI 

i have a similar issue where i ahev to calculate the precentage in a slightly different way.

e have a model build in power bi like this.Using this model i have to built a matric visual in power bi which has unit in the column and liquidity name,expense heading and expense header sub categories in the rows.The values should be sum of amount and GTN%.The challenging part is to create the Gross to Net percentage creation.The customer has asked us to show the GTN percentage for different expense heading as shown below. For example ,if the value for expense heading one is 2 and the total value for the liquidity type="income" is 900.The percentage has to calculated like 2/900 for each expense heading.Iam struggling to get this done.

 

Here the expense heading come from one dimension table called dim expense heading,liquidity comes from another table which has both income and expense liquidity, the unit comes from different dimensions.The fact has all the surrogate key for these dimensions.

 

I have created a DAX =calculate(sum(amount),dimliquidity="expense")/calculate(sum(amount),dimliquidity="INCOME").But this is not showing the percentage across all the expense heading rows.

 Unit1(dim unit) 
 AmountGTN%
liquidity(income)(dim-liquidity)968 
   
liquidity(expense)  
expense1(dimexpense heaidng)-280%
expense2-45-5%
expense3-153-16%
expense4-12-1%
expense5-23-2%
expense6-14-1%
expense7-40%
expense8-20%
expense9-42-4%
expense10-40-4%
expense1100%
Total Expenditure-364-35%

remyacholayil_0-1649072821362.png

This is showing only at the higher level.not at athe expense heading levels.

 

 

 

i want to populate percentage in all the rows aganist the  expense heading name corresponding to that.

 

Could anyone help meplease

AnkitBI
Solution Sage
Solution Sage

Can you define your requiement with a sample data.

Anonymous
Not applicable

Example dax %.JPG

 

I have this data and I want to calculte the percentage of each category and subcategory base on my Total Sales of Music category.

Try Below

Measure = DivIDE(SUM(Source[Value]),CALCULATE(sum(Source[Value]),filter(all(Source),Source[Category]= "Musica")))

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

 

 

Anonymous
Not applicable

It works perfectly. Thank you.

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.