Forum Discussion
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")
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
1 Reply
- BA_PeteSuper 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