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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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