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

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

Reply
Harry_Tran
Helper III
Helper III

Convert DAX to M

Hi everyone,

I have a column like this:

A = COUNTX

                  ( FILTER 

                             ('Date', 'Date'[Date] >= 'Sales'[StartDate] && 'Date'[Date] <= 'Sales'[EndDate] and 'Date'[Filter] = 1)

                  , 'Date'[Date] )

 

How can I recarete this column in Power Query

Thanks

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Harry_Tran

 

I assume you have this calculated column on the 'Date'-table.

Depending on the amount of data in 'Sales' you can create the column in power query by adding a custom column to 'Date', and just write Sales. Then expand the table, and create a calculated column which returns 1 if date is between start and end, and Filter=1. The use groupby with count, and you should have it.

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

 

View solution in original post

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Harry_Tran

 

I assume you have this calculated column on the 'Date'-table.

Depending on the amount of data in 'Sales' you can create the column in power query by adding a custom column to 'Date', and just write Sales. Then expand the table, and create a calculated column which returns 1 if date is between start and end, and Filter=1. The use groupby with count, and you should have it.

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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