Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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]
ID | ProdOrder | ItemCode | MaterialDoc | MvtType | Qty | Unit | Batch | RemQty | ProdLine | Date | ProdLine (groupes) | Qty Corrigé | New Prodline |
150954 | 100005820041 | ZZ70496221-05XM | 6029705832 | 101 | 2400 | PC | 0017964847 | PER | 17/08/2023 06:38 | 50 - PER | 2400 | ||
151079 | 100005820041 | ZZ70496221-05XM | 6029707684 | 101 | 2134 | PC | 0017964847 | PER | 17/08/2023 11:28 | 50 - PER | 2134 | ||
151148 | 100005820041 | ZZ70496221-05XM | 6029708094 | 101 | 2133 | PC | 0017964847 | PER | 17/08/2023 13:43 | 50 - PER | 2133 | ||
151078 | 100005820041 | ZZ70496221-05XM | 6029707682 | 102 | 2400 | PC | 0017964847 | 17/08/2023 11:28 | (Vide) | -2400 | |||
151147 | 100005820041 | ZZ70496221-05XM | 6029708092 | 102 | 2134 | PC | 0017964847 | 17/08/2023 13:42 | (Vide) | -2134 | |||
150716 | 100005820042 | ZZ70496221-05XM | 6029703776 | 101 | 2146 | PC | 0017964849 | PER | 17/08/2023 00:18 | 50 - PER | 2146 | ||
151216 | 100005820043 | ZZ70496221-05XM | 6029708611 | 101 | 2284 | PC | 0017964850 | PER | 17/08/2023 16:43 | 50 - PER | 2284 | ||
151219 | 100005820043 | ZZ70496221-05XM | 6029708626 | 101 | 2283 | PC | 0017964850 | PER | 17/08/2023 16:48 | 50 - PER | 2283 | ||
151217 | 100005820043 | ZZ70496221-05XM | 6029708622 | 102 | 2284 | PC | 0017964850 | 17/08/2023 16:48 | (Vide) | -2284 | |||
150992 | 100005820044 | ZZ70496221-05XM | 6029706124 | 101 | 2222 | PC | 0017964851 | PER | 17/08/2023 07:18 | 50 - PER | 2222 | ||
151456 | 100005820047 | ZZ70496221-05XM | 6029709342 | 101 | 2214 | PC | 0017964854 | PER | 17/08/2023 23:24 | 50 - PER | 2214 |
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |