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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
What3lse
New Member

Fill Missing Value

Hello everybody,

I'm discovering DAX language and I have some difficulties to do thant I want.

I will explain you my issue.

 

in the field "Prodline", I don't have always value, I have only one when "MvtType" is 101.

I would like to complete Field "Prodline" when data is missing and take data when "ProdOrder" is same

 

I tried to mix together function IF and LookUpValue but It's not working

 

You can find an extract of my table below

 

Thanks you a lot.

 

Regards 🙂

 

table [Trial_Table]

 

IDProdOrderItemCodeMaterialDocMvtTypeQtyUnitBatchRemQtyProdLineDateProdLine (groupes)Qty CorrigéNew Prodline
150954100005820041ZZ70496221-05XM60297058321012400PC0017964847 PER17/08/2023 06:3850 - PER2400 
151079100005820041ZZ70496221-05XM60297076841012134PC0017964847 PER17/08/2023 11:2850 - PER2134 
151148100005820041ZZ70496221-05XM60297080941012133PC0017964847 PER17/08/2023 13:4350 - PER2133 
151078100005820041ZZ70496221-05XM60297076821022400PC0017964847  17/08/2023 11:28(Vide)-2400 
151147100005820041ZZ70496221-05XM60297080921022134PC0017964847  17/08/2023 13:42(Vide)-2134 
150716100005820042ZZ70496221-05XM60297037761012146PC0017964849 PER17/08/2023 00:1850 - PER2146 
151216100005820043ZZ70496221-05XM60297086111012284PC0017964850 PER17/08/2023 16:4350 - PER2284 
151219100005820043ZZ70496221-05XM60297086261012283PC0017964850 PER17/08/2023 16:4850 - PER2283 
151217100005820043ZZ70496221-05XM60297086221022284PC0017964850  17/08/2023 16:48(Vide)-2284 
150992100005820044ZZ70496221-05XM60297061241012222PC0017964851 PER17/08/2023 07:1850 - PER2222 
151456100005820047ZZ70496221-05XM60297093421012214PC0017964854 PER17/08/2023 23:2450 - PER2214 
1 REPLY 1
barritown
Super User
Super User

Hi @What3lse,

If I correctly understand the logic for filling missing values, you could use a calculated column like this:

barritown_0-1692611081864.png

In plain text for convenience:

ProdLine Updated = 
IF ( NOT ISBLANK ( [ProdLine] ),
     [ProdLine],
     VAR CurrentProdOrder = [ProdOrder]
     VAR Result = MAXX ( FILTER ( Data, [ProdOrder] = CurrentProdOrder ), [ProdLine] )
     RETURN Result )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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