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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Dirk_Carpentier
New Member

Formula not working in Power Query while in the default Power BI pane the new column works

I have a table as per below with HardwareHostname & Last EnterpriseWindows columns for which I could create new colum based on value "1" in the Last EnterpriseWindows colum and also set the value to 1 for simlar hostnames in the HardwareHostName as per below in yellow. I now wanted to copy/repeat this in the Power Query Editor but this does not work at all and tried to change but end up in failure 😞 anyone a clue how to get the same outcome with the Power Query Editor? 

 

used:

IF(COUNTROWS(FILTER(ALL(WINDOWS_License_published), (WINDOWS_License_published[HardwareHostName] = EARLIER(WINDOWS_License_published[HardwareHostName])) && WINDOWS_License_published[EnterpriseWindows] = "1")) > 0, "0", "1")

 

PB1.JPG

 

PBI2.JPG

 

PBI.JPG

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Dirk_Carpentier ,

 

Power Query uses the 'M' language and you're trying to feed it DAX.

Looking at your desired calculation, I think you're better off leaving it as a DAX Measure or Calculated Column in the data model and not trying to reproduce it in Power Query (M).

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @Dirk_Carpentier ,

 

Power Query uses the 'M' language and you're trying to feed it DAX.

Looking at your desired calculation, I think you're better off leaving it as a DAX Measure or Calculated Column in the data model and not trying to reproduce it in Power Query (M).

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors