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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jimmytwoburgers
New Member

Is it possible to represent a windows file and folder structure in a report?

Hi,

I am trying to represent a folder and file structure in a report.  I want to be able to expand and minimise the folders.  Is this possible within PowerBI?  I have been playing around with Matrix Visual and Hierarchies and can't get it right.  

The data is already in a SQL database and I can export to Excel.   There are two tables, folders and files.

Folder table:   id_object, foldername, id_parent
Files table: id_object, filename, id_parent

I idealy want to display it in a matrix looking like this (ignore the size / type - don't need those)

 

jimmytwoburgers_0-1750698255561.png

Any help would be apprechiated.  Thanks

 

9 REPLIES 9
jimmytwoburgers
New Member

Thanks All, using all the examples AI gives me just doesn't work, end up with the following:

 

jimmytwoburgers_0-1752178576073.png

 

 

Hi @jimmytwoburgers 
Could you please review the pbix file below? It may be helpful. If you continue to have any issues, please feel free to reach out to the community.

Thank you for reaching out to the Microsoft Fabric Forum Community.

Hi @jimmytwoburgers 
Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted  If yes, marking the relevant solution would be awesome for others who might run into the same thing. if you have any other issues, please feel free to reach the communty.

v-priyankata
Community Support
Community Support

Hi @jimmytwoburgers 

Thank you for reaching out to the Microsoft Fabric Forum Community.

Please try below, For your reference, I’m attaching the .pbix file

  • Add a column to distinguish between folders and files (e.g.,type="Folder" or "File")
  • Combine both tables into a single table using Union in Power Query.
  • Add Matrix to distinguish b/w Files and folders


    If this information is helpful, please “Accept as solution”  to assist other community members in resolving similar issues more efficiently.
    Thank you.

Hi @jimmytwoburgers 

I hope the information shared was helpful to you. If your question has been answered, kindly mark the most relevant reply as the Accepted Solution. This small action can make a big difference for others who are looking for the same solution.

Hi @jimmytwoburgers 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Hi @jimmytwoburgers 

Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted  If yes, marking the relevant solution would be awesome for others who might run into the same thing.

Thanks for the pointers - I am still stuggling to achieve this.  I need it to have the folders at the top then when expanding list the subfolders or files if there are any.  Two problems I seem to have when trying every option either given to me by AI or solutions I have found googling.

- Hierachy / relationships:   Tried lots of different options, nothing really works. 
-  Matrix  - Always shows the ID and not the folder name / file name - I think its the relationships any ideas?

I am trying to get it like this:

Root
└── Folder1
     ├── Subfolder1
│   └── FileA
      └── Subfolder2
      └── FileB

I can manipulate the data easily enough but I have tried single tables / 2 tables with a relationship / 3 tables with a relationship etc etc.

I am using some very basic data as well to try and configure it

IDNameID_ParentType
0Root Folder
1Global Folder0Folder
201 Folder1Folder
302 Folder1Folder
601 Subfolder 12Folder
701 Subfolder 22Folder
802 Subfolder 13Folder
100Welcome.txt6Files
101Hello.txt6Files
102About.txt8Files
103Config.txt8Files


Although my actual live data has 26 levels deep. 

Any help would be great

 

KNP
Super User
Super User

@jimmytwoburgers - there was a missing disclaimer from @DanielaOliveira's answer. Here, I'll add it...

 

"This answer was pasted directly from ChatGPT. ChatGPT can make mistakes. Check important info."

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors