Forum Discussion
SINGLE COLUMN WITH HIERARCHICAL DATA
I'm working on a project where I need to aggregate data from a flat file that contains region codes (starting with "R") and chapter codes (starting with non-"R" letters). The data needs to be aggregated based on a hierarchy defined in a region mapping table, which has two columns defining region relationships.
In addition to the region and chapter codes, there are other factors (PSC code and NAC code) that play a role in the calculations. I'm looking for advice on the best strategy to perform this aggregation while considering these factors.
Specifically, I have the following questions:
How can I effectively use the region hierarchy for aggregation when combining data from the flat file and the region mapping table?
Thank you !! I was able to resolve it myself
4 Replies
- AnonymousNot applicable
Hi Tan_g,
Thank you for reaching out to the Microsoft Fabric Forum Community.
To better assist you, could you please share a small sample of your data set
A few rows from the flat file, including Region/Chapter codes, PSC code, NAC code, and values to be aggregated.
A few rows from the region mapping table showing how regions are related.
And most importantly, what the expected output should look like after aggregation.
This will help ensure the solution aligns with your hierarchy and aggregation logic.
Thank you!
- AnonymousNot applicable
Hi Tan_g,
I hope you're doing well! I just wanted to follow up on the query you posted regarding the sample data. Have you had a chance to review the details we requested, including a few rows from your flat file (Region/Chapter codes, PSC code, NAC code, and values to be aggregated), the region mapping table, and an example of the expected output after aggregation?
If you're still facing any difficulties or need further assistance, please don't hesitate to let us know we're happy to help!
Best regards,
Prasanna Kumar- Tan_gFrequent Visitor
Thank you !! I was able to resolve it myself
- AnonymousNot applicable
Hi Tan_g,
That's great to hear! If possible, please consider posting the steps you took to resolve the issue and mark it as the accepted solution,it could really help others in the community facing a similar problem.
Thanks & Regards,
Prasanna Kumar