Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
JohnMoto
Regular Visitor

Sum Various Categories in 1 table then column graph % difference from highest summed category

Hello,

 

I have Three Columns, each has:

 

3 locations (i.e., a,b,c)

3 catergoies (i.e., 1,2,3)

Sales data assoccated with various combiniations (2000+ lines long)

 

I'd like to display the % difference in a visulasation in this mannor > Total Caterory 3 Values for Each Location --> Then which ever has the highest total sales (lets say location 2 had most sales for all sales of category 3), to then model a graph that shows % below the total value of salves between each store.

 

I.e. Store 1 had 10% less sales when compared to the total sales for that category from location 2.

 

Ideally the chart will have three bars

1. Location one total sales for cat 3 @ 100%

2. Location two total sales for cat 3 @ -10%

3. Location three total sales for cat 3 @ -12%

 

I've created a measure that sums all of the caregories via location done, thats simple... i can't figure out how to convert these to a reduction percentage of the highest value.

 

Any assistance would be greatly appreacated. 

 

1 REPLY 1
v-xiaosun-msft
Community Support
Community Support

Hi @JohnMoto ,

 

I think that you can use a calculated column to return the highest total sales.

Column =
CALCULATE (
    SUM ( 'Table'[sales] ),
    FILTER (
        'Table',
        'Table'[location] = EARLIER ( 'Table'[location] )
            && 'Table'[category] = EARLIER ( 'Table'[category] )
    )
)

Then find the maxium of it.

But could you describe more clearly about sales and stores, since you need a graph that shows % below the total value of salves between each store.

If you can provide some sample data(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,
Community Support Team _ xiaosun

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.