Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Community,
I am working on a sales table (1), when the sales value is null I have to return the previous nonblankvalue for each product (2).
I used the following formula but it's not returning the values I am looking for:
Could you please help me correcting my formula to get the green column.
Thank you in advance.
Solved! Go to Solution.
[Column] = var __product = Products[Product] var __date = __Products[DateKey] var __lookupTable = filter( filter( Products, Products[Product] = __product ), NOT ISBLANK( Products[Sales] ) && Products[DateKey] <= __date ) var __sales = MAXX( TOPN( 1, __lookupTable, Products[DateKey] ), Products[Sales] ) return __sales
Best
Darek
[Column] = var __product = Products[Product] var __date = __Products[DateKey] var __lookupTable = filter( filter( Products, Products[Product] = __product ), NOT ISBLANK( Products[Sales] ) && Products[DateKey] <= __date ) var __sales = MAXX( TOPN( 1, __lookupTable, Products[DateKey] ), Products[Sales] ) return __sales
Best
Darek
Hi @Anonymous ,
Thank you for the solution. It works 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |