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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.