March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Hello experts,
I have a table below, I want to create a new column "Grand parent". I am trying to create a column, to look in "Level Index" if it is not one, then look on the previous row, if it is also not one, keep looking on the previous rows, it finds the earliest 1. When found, bring the item number. but it also needs to consider the SQU ID. meaning, keep looking for earlier level index one, for the same SKU ID.
the purpose of this column is to make a slicer. so if I filter by 444555, it should bring all the levels below for the same SKU ID.
thanks in advance.
Solved! Go to Solution.
Hey Pinherio,
Looks like you need the PATH family of functions for this. First thing I did was replace your 0's with blanks. Then I added a column with this formula:
Grand Parent =
PATHITEM (
PATH (
'Table'[Item Number],
'Table'[Parent Item Number]
),
1
)
I also added the path itself as a column for visualization purposes, but you only need the Grand Parent column above.
Please let me know if that doesn't work for you.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Proud to be a Super User! | |
Hey Pinherio,
Looks like you need the PATH family of functions for this. First thing I did was replace your 0's with blanks. Then I added a column with this formula:
Grand Parent =
PATHITEM (
PATH (
'Table'[Item Number],
'Table'[Parent Item Number]
),
1
)
I also added the path itself as a column for visualization purposes, but you only need the Grand Parent column above.
Please let me know if that doesn't work for you.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |