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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
logistics_power
Regular Visitor

% of the subtotal

Hi experts,

I have a matrix visual as below with values in M3.

I would like to get a subtotal% split for each supplier region name.

Output measure expected as per column "M3% of Subtotal"

can anybody help with a DAX?

PS: Data is from datawarehouse model in which each of these fields are from different cubes like Supplier, Destination, Transaction type and Sales (M3).

Capture.JPG

1 ACCEPTED SOLUTION

https://community.fabric.microsoft.com/t5/Desktop/Multiple-AllEXCEPT/td-p/2451860

 

please check this link, 

 

# Of Job Order ID's (Specific Purpose) = 
if(
    max('Job Stage (with Total Vacancies)'[Value])="Total Vacancies",    
        CALCULATE(
            [# Of Job Order ID's],                                   
            ALLEXCEPT(                
                'FACT_JobCandidate-Current_LastWeek_Combined',
                'FACT_JobCandidate-Current_LastWeek_Combined'[Job Stage],
                'FACT_JobCandidate-Current_LastWeek_Combined'[Source Period]               
            ),
            ALLEXCEPT(
                'Cost Centre',
                'Cost Centre'[Cost Centre]
            )
        ),                
    CALCULATE(
        [# Of Job Order ID's],
        USERELATIONSHIP('Job Stage (with Total Vacancies)'[Value],'FACT_JobCandidate-Current_LastWeek_Combined'[Job Stage])
    )
)

View solution in original post

8 REPLIES 8
raji_n
Resolver I
Resolver I

 
@logistics_power  Try this please,
Measure = SUM('Table'[Value])/CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Region], [destination title] ,[transaction type]))

@raji_n 

the columns destination title and transaction type are from different tables linked within the model.

May be thats why dax formula is not accepting when I add the 2 columns. Supplier region name is from table Supplier.

any work around for such scenario?

thanks

https://community.fabric.microsoft.com/t5/Desktop/Multiple-AllEXCEPT/td-p/2451860

 

please check this link, 

 

# Of Job Order ID's (Specific Purpose) = 
if(
    max('Job Stage (with Total Vacancies)'[Value])="Total Vacancies",    
        CALCULATE(
            [# Of Job Order ID's],                                   
            ALLEXCEPT(                
                'FACT_JobCandidate-Current_LastWeek_Combined',
                'FACT_JobCandidate-Current_LastWeek_Combined'[Job Stage],
                'FACT_JobCandidate-Current_LastWeek_Combined'[Source Period]               
            ),
            ALLEXCEPT(
                'Cost Centre',
                'Cost Centre'[Cost Centre]
            )
        ),                
    CALCULATE(
        [# Of Job Order ID's],
        USERELATIONSHIP('Job Stage (with Total Vacancies)'[Value],'FACT_JobCandidate-Current_LastWeek_Combined'[Job Stage])
    )
)
raji_n
Resolver I
Resolver I

@logistics_power  do you have a sample dump or pbix that you can share for me to review it?

In the allexcept part you have to add other 2 columns as well, like in your case destination title and transaction type.

@raji_n 

Unfortunately not. I dont have sample pbix.

can you tell me how to add the other 2 columns. I ll try that solution.

thanks

raji_n
Resolver I
Resolver I

Measure = SUM('Table'[Value])/CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Region]))
 
 Please mark this as a solution, if it solves your problem.

Hi Raji_n

for some reason I am seeing 100% on each row.

I tested the part CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Region])) and it is giving me the same result as the value M3 instead of the subtotal. Hence percentage is 100%

Any idea what could be causing it?

@logistics_power  if my solution is helpful, please mark it as answered, so that other users can find it easily.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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