Forum Discussion

What3lse's avatar
What3lse
New Member
3 years ago

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

  • Hi What3lse,

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

    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