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
Camus
Frequent Visitor

How to keep the values of parent category when adding a subcategory to a table

Hi Everybody!

 

I've been tackling this issue for 3 days now and I can't find a solution. While trying to educate myself on DAX until I figure out the solution myself, I thought that maybe someone can give me a hand.

Background:

 

I have a list with sales of products (let's say wine) that are categorized by type (white, red, sparkly etc). In another list I have a list of stores that have minimum shelf space described. Based on the percentage of the sales share (KPI consisting of different sales metrics) I should be able todetermine the amount of SKUs of each category that can be put in the store shelves. This I managed to do, but the issue is that when I introduce the products to the powerbi table, the values change. I imagine that the issue is with filtering. Could anyone help me to improve the following formula of the measure seen below?

 

floor([KPI]*100/calculate([KPI];ALL(Salesdata[Category]))*calculate(MIN(Storespace[Minimumspace]);ALL(Salesdata[Category]))/100;1)

 

 

1 REPLY 1
vanessafvg
Super User
Super User

@Camus it would be difficult to help you without seeing what the issue is now vs what you want it to be

 

please provide screen shots of your data, the error and the expected result





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.