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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
codyraptor
Resolver I
Resolver I

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 refresh...so I'm stuck having to use the editor.

 

I have an aggregate table setup....now 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 stuck..so any help in the right direction would be greatly appreciated.

 

 
1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@codyraptor,

 

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

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors