• The column t00.[CustNo] is never NULL, so you'll always end up with a value of 0.

    You don't need the nested CASE, you can just add more conditions as needed.

    Select t00.[InvDate]

    ,t00.[CustNo]

    ,t00.[Salesman]

    ,t00.[Quantity]

    ,t00.[ExtendedPrice]

    ,t00.[ExtendedCost]

    ,t00.[ItemNo]

    ,t00.[InvoiceNo]

    ,t00.[LineNo]

    ,t00.[Warehouse]

    ,t00.[chargecust]

    ,t01.[customerid] AS CustomerIdT01

    ,t02.[salesman] AS SalesmanT02

    ,t03.itemid AS ItemIdT03

    ,t03.[commissionperc]AS ItemComPercT03

    ,t04.[productfamilyid] AS ProductFamilyIdT04

    ,T05.[ProductFamilyID] AS ProductFamilyIdT05

    ,t05.[commissionperc]as ProdFamilyComPercT05

    ,T06.[Customerid] AS CustomerIdT06

    ,t06.[commissionperc] AS CommissionPercT06

    ,Case when [t00].[CustNo]is not null then 0

    when [t02].[salesman]is not null then 0

    when [t06].[customerid] is not null then [t06].[commissionperc]

    when [t03].[ItemID] is Not Null then [t03].[commissionperc]

    Else [t05].[commissionperc] end AS BaseCommPerc

    FROM [US02301_DWH].[dbo].[Fact_InvoiceAnalysis]t00

    left join [dbo].[manualNOcommissioncustomer]as t01 on t00.[chargecust]=t01.[customerid]

    left join [dbo].[manualNOcommissionsalesgroup] as t02 on t00.[salesman]=t02.[salesman]

    left join [dbo].[manualcommissionitem] as t03 on t00.[itemno]=t03.[itemid]

    left join [dbo].[itemmaster] as t04 on t00.[itemno] = t04.[itemid]

    left join [dbo].[ManualCommisionProductFamily]as t05 on [t04].[productfamilyid] = [t05].[productfamilyid]

    LEFT JOIN [dbo].[ManualFixedCommissionCustomer] as T06 on [t00].[custno]=[t06].[customerid]

    where YEAR([invdate])='2015' and T00.salesman='16'

    order by t00.Salesman desc

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2