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
Anonymous
Not applicable

Extracting Value from a column based value of another in direct query

So i have this table with columns action and created_at. I want to get the date in created_at based on a value in action. I want the results as a column in which if the condition wasnt met , a "NULL" fill the cell. Important note is that i am using direct query which imposes so many restrictions .Capture.JPG Here is a screenshot of a data sample from the table.

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous ,

 I am also using Direct Query. Please check the text for errors.  Could you please tell me what is your data source? I am using SQL Server. My test version: 2.102.683.0 64-bit (February 2022).

vpollymsft_0-1646893048434.png

 

I have also found some similar posts, please refer to it to see if it helps you.

Redshift and data folding error 

Data shows up in charts but not in table or matrix 

BigQuery malformed data in PBI 

 

If I have misunderstood your meaning, please provide your pbix without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Anonymous
Not applicable

i am using postgre sql database , i re checked the text but i am still getting the same folding error.

Anonymous
Not applicable

Hi @Anonymous ,

Could you please tell me that the type of the Action? If it is text, using max dax has no effect on it. And you are using Direct Query mode, you cannot use Selectedvalue dax.

Please have a try. 

Measure = IF(MIN('Table'[Action])="CALL_PATENT",MAX('Table'[created_at]),"null")

vpollymsft_0-1646805368814.png

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.


Best Regards

Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

you understood my meaning correctly. To answer your questions , I am using Direct Query which poses restrictions. The type of the action is indeed text . I tried the measure but it didn't work. A folding problem.Capture.JPG

Anonymous
Not applicable

i basically want to do the same thing you showed me , but with the condition based on the action column not the 'true or false' in requires follow up column. so i think an IF measure works but MAX function needs to change 

Anonymous
Not applicable

So why are we basing the new column on the 'requires follow up' column ? i want the created measure to have the created date in the cell if the action is 'call_patient' , if not i want 'null' to fill the cell.  

Anonymous
Not applicable

Hi @Anonymous ,

Could you please tell me that how can you get the data in created_at based on a value in action?  The requires_follow_up is TRUE or FALSE? 

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure = IF(MAX('Table'[requires_follow_up])="True",MAX('Table'[created_at]),"null")

vpollymsft_0-1646793828224.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.


Best Regards

Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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