Formula working in Power BI but not in Power Pivot?

Anything related to PowerPivot and DAX Formuale
dpalumbo15
Posts: 1
Joined: Mon Feb 15, 2021 11:09 pm

Formula working in Power BI but not in Power Pivot?

Postby dpalumbo15 » Mon Feb 15, 2021 11:12 pm

Hello guys,

I created a calculated column using the following formula, but it only works on Power BI and not in Power Pivot (don't show error but blank cells) using the same exact data model (checked this many times):

{L_CODE}{L_COLON} {L_SELECT_ALL_CODE}

Actual Units SO =
CALCULATE (
    SUM ( COM_SellOut[QuantitySold] ),
    FILTER ( COM_SellOut, COM_SellOut[Date] >= TMK_Promotion[FromDate] ),
    FILTER ( COM_SellOut, COM_SellOut[Date] <= TMK_Promotion[ToDate] ),
    FILTER ( COM_SellOut, COM_SellOut[ProductCode] = TMK_Promotion[ProductCode] ),
    FILTER ( COM_Customers, COM_Customers[id] = TMK_Promotion[Customer] )
)


A little context: this formula iterates a promotion table and calculates the units sold of a given product, in a given customer between a given period. Works flawlessly in PowerBI but not on PowerPivot.

Any ideas of what could be causing the problem?

Thanks in advance!

MattAllington
Posts: 1154
Joined: Sun May 04, 2014 4:01 pm
Location: Sydney, Australia

Re: Formula working in Power BI but not in Power Pivot?

Postby MattAllington » Wed Feb 17, 2021 6:33 am

Check the data types of your columns to make sure they are not different in PP vs PBI.

Bonus tips
- read the error message that it gives when it doesn’t work
- consider if this should be a column or a measure https://exceleratorbi.com.au/calculated ... sures-dax/
Matt Allington is Self Service BI Consultant, Trainer and Author of the Book "Supercharge Power BI".
Power BI Training


Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 5 guests