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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Dunner2020
Post Prodigy
Post Prodigy

Converting dax measure into column in power Query

Hi there,

 

I have a dax measure which looks like as follow:

 

No days notice given directly to consumers = 
VAR retail_notify = INT ( MAX ( 'FactTable'[Retail Consumer Direct Notify] ) )
VAR Event_start =INT (MAX ( 'FactTable'[Actual Event Start Time] ) )
VAR Event_type = MAX ( 'FactTable'[EventType] ) 
VAR varDaycount =
IF (
Event_type = "2"
&& YEAR ( retail_notify ) > 1900
&& NOT ( ISBLANK ( retail_notify ) ),
 
COUNTROWS (
FILTER (
ALL ( Dates[Date], Dates[IsHoliday], Dates[Day Of Week Name] ),
Dates[Date] >= retail_notify
&& Dates[Date] <= Event_start
&& Dates[IsHoliday] = FALSE ()
&& Dates[Day Of Week Name] <> "Saturday"
&& Dates[Day Of Week Name] <> "Sunday"
)
)
)
RETURN
varDaycount

 

I wanted to convert the above dax measure into a facttable column using Power Query lanugage. I could not figure out how should I calculate the difference between two dates by exluding few conditions (such as weekends) in power query. Any help would be really appreciated

 

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @Dunner2020 

If possible ,please share your  tables ( 'FactTable' and 'Dates') or sample pbix file (enter data) for testing.

 

Best Regards,
Community Support Team _ Eason

 

lbendlin
Super User
Super User

It is fundamentally impossible to convert a measure into a column, regardless if Power Query or not. Measures are impacted by user interactions, columns are immutable.

 

If your "No days notice given directly to consumers " calculation does not depend on user interaction then you can recreate it as a column in DAX with only some minor code changes. What is your rationale for wanting this in Power Query?

Yes, "No days notice given directly to consumers " does not depend upon user interaction.  I was calling this measure into many measures and it is causing a lot of delays, converting into a column would (hopefully) reduce the computational time. 

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.