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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

minimum direct query mode

Hi,

 

Within direct query mode, I get the following message trying to find a minimum transaction date:

Function 'MIN' is now allowed as part of a calculated column DAX expressions on DirectQuery models.

 

What is the alternative? I want calculate the difference between a workorder completion date and the first resource transaction date.

 

Thanks for your help!

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, you could use "FIRSTNONBLANK" function to substitude the "MIN" function.

You could refer to below link:

https://msdn.microsoft.com/en-us/query-bi/dax/firstnonblank-function-dax

 

Reagards,

Daniel He

 

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Daniel,

 

Thanks for your post! Power BI direct query does not recognize the function FIRSTNONBLANK when I enter the function. Latest version which I installed is the August 2018 version. To complete my question: For each mfg order name (column A) I want to calculate the difference between completion date and first empl book date. In beneeth table you can make this date visible by selecting 'earliest first_empl_book_date' in the visualization of the table. However I want to calculate this date to compare it with the completion date for each mfg_order_name.

 

Machining_resource_hours - Power BI Desktop_2018-10-02_10-05-07.png

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.