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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Glamour16
Regular Visitor

Percentage of total sales by product

Hi Guys,

Been reading AND trying all calculation possible but with no real results.. I want to calculate the % of total sales by product, my table looks like below and I have a total of 3 years in... Help - Thank you Natacha

Relative continuous monthWholesalerPractice nameDDMS codePostal codeProductProduct groupTherapeutic DomainSales Territory: TVM TerritoryRebate GroupsFOCValue
(£)
No. packs sold
(number)
CALENDAR YEARQUARTER
January-18Agrihealth NIEAST DOWN FARMERS LTD401243BT30 7EUSCOURPROOF EXTRA 4X16X100SCOURPROOFGastroenterologyWilliam BairdNONEPAID32.4912018Q1
January-18Agrihealth NIFRANCIS CONNON GENERAL MERCHANTS401227BT42 3HLSCOURPROOF EXTRA 2X40X100SCOURPROOFGastroenterologyWilliam BairdNONEFOC80.8212018Q1
January-18Agrihealth NIFRANCIS CONNON GENERAL MERCHANTS401227BT42 3HLSCOURPROOF EXTRA 2X40X100SCOURPROOFGastroenterologyWilliam BairdNONEPAID808.20102018Q1
January-18Agrihealth NIGLENS FARM SUPPLIES402380BT44 0RRSCOURPROOF EXTRA 2X40X100SCOURPROOFGastroenterologyWilliam BairdNONEPAID889.02112018Q1
January-18Agrihealth NISTEELE FARM SUPPLIES401339BT53 6EESCOURPROOF EXTRA 2X40X100SCOURPROOFGastroenterologyWilliam BairdNONEPAID1,778.04222018Q1
January-18Agrihealth NIULSTER LIVESTOCK CARE401353BT45 7NSSCOURPROOF EXTRA 2X40X100SCOURPROOFGastroenterologyWilliam BairdNONEPAID161.6422018Q1
2 ACCEPTED SOLUTIONS
AlB
Super User
Super User

@Glamour16 

See the attached file for a possible solution

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

v-alq-msft
Community Support
Community Support

Hi, @Glamour16 

 

You may create a measure as below.

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALLSELECTED('Table')
    )
)

 

Result:

 a1.png

 

Best Regards

Allan

 

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

6 REPLIES 6
sneha_rudra
Frequent Visitor

Hi,

I also got 100% in all columns for all products, please help where it went wrong..

v-alq-msft
Community Support
Community Support

Hi, @Glamour16 

 

You may create a measure as below.

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALLSELECTED('Table')
    )
)

 

Result:

 a1.png

 

Best Regards

Allan

 

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

Thanks Allan, but I get 100% everywhere, I must be missing something?

AlB
Super User
Super User

@Glamour16 

See the attached file for a possible solution

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Thank you. I know it is correct but it give me 100% in all columns for all product...

AlB
Super User
Super User

Hi @Glamour16 

Please explain what the expected result would be for the sample data provided

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Cheers 

 

SU18_powerbi_badge

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors