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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
bob57
Helper IV
Helper IV

Calculate percentage column.

Good day,

I need to add a column to show the Total Credit Invoices percentage for each name by zone. For example, the first row of the new column would display 12.5% (Alice had 2 of the 16 credit invoices from zone A). There is a slicer for Zone and Date.

bob57_0-1601956718096.png

Here is a link to a .pbix file: https://1drv.ms/u/s!Agkx6hQs0NiX1BHLXrIY5klP-GIy?e=ASjIXM. I thought it would be easier to provide this than to clutter the post with tables and models. In a nutshell, I am simply counting the rows of the Sales Invoices table to determine the # of invoices: Total Invoices = COUNTROWS( 'Sales Invoices' ). Then I am filtering using the Invoice Type column to determine the number of credit invoices: Total Credit Invoices = CALCULATE( [Total Invoices], 'Sales Invoices'[Invoice Type] = "C" ). Now to calculate the percentages as described above has become a gate.

I'm grateful for the time and effort expended by the people on this forum.

Regards,

Bob

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Hi, @bob57 , you may want to try this measure

% of Total Credit Invoices =
DIVIDE (
    [Total Credit Invoices],
    CALCULATE (
        [Total Credit Invoices],
        ALLEXCEPT ( 'Sales Invoices', Zones[Zone] )
    )
)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thank you! That did the trick and it makes perfect sense,

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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