Showing results for 
Search instead for 
Did you mean: 
codyraptor Regular Visitor
Regular Visitor

Dax help!!

Hey everyone.  I'm trying to create an aggregate table to take advantage of the incremental refresh using 'power query'.  I normally create this using sql, but unfortunately that process takes away the ability to do the incremental I'm stuck having to use the editor.


I have an aggregate table I just need to 'define my sale' so I can have an accurate sales count.  Below is the definition:

Count of distinct contracts

Status in "A", "C"

Accounting Date not null

Cancel Date is null or Cancel month is > Accounting month   (this means we don't count a sale if the cancel happens in the same month as the accounting date)


I can get most of this logic to work except for the last statement.  I can't use 'datediff' because I need this function to read from the aggregate table and I can't use datediff in a direct query table.  I'm feeling any help in the right direction would be greatly appreciated.


Community Support Team
Community Support Team

Re: Dax help!!



I cannot reproduce the issue. But you may try YEAR and MONTH.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 35 members 967 guests
Please welcome our newest community members: