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

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.

Reply
hcze
Helper I
Helper I

Financial statement

Dear experts,

 

I am trying to build a financial report to show in below format using matrix: 

Note that the revenue has no children

hcze_0-1594365092029.png

 

So far, below is the format that I managed to get:

hcze_1-1594365187324.png

 

and this is the data structure that I am currently using

hcze_2-1594365401027.png

 

Any help is appreciated. Please note that I need expand/collapse to work as well (the actual statement is huge with much more financial items)

 

Thanks,

hcze

1 ACCEPTED SOLUTION

Hi @hcze ,

it seems you're looking for a ragged hierarchy where drilldown/level expansion stops once there are no more children:

 

image.png

 

This isn't natively supported in Power BI and you need some data modelling and DAX sorcery to achieve this.

I've blogged about this method here: https://www.thebiccountant.com/2019/10/03/parent-child-hierarchies-with-multiple-parents-in-power-bi...

But realized that a dedicated blogpost for your kind of task would be helpful as well, as the data has to be prepared in a special way. Hopfully I find the time to write this up soon.

However, I'm enclosing a sample file that hopefully helps you to apply this to your data.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

6 REPLIES 6
v-yiruan-msft
Community Support
Community Support

Hi @hcze ,

Please check if the below screen shot is what you want. If yes, you can refer my sample pbix file to get it.

Financial statement.JPG

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @hcze ,

it seems you're looking for a ragged hierarchy where drilldown/level expansion stops once there are no more children:

 

image.png

 

This isn't natively supported in Power BI and you need some data modelling and DAX sorcery to achieve this.

I've blogged about this method here: https://www.thebiccountant.com/2019/10/03/parent-child-hierarchies-with-multiple-parents-in-power-bi...

But realized that a dedicated blogpost for your kind of task would be helpful as well, as the data has to be prepared in a special way. Hopfully I find the time to write this up soon.

However, I'm enclosing a sample file that hopefully helps you to apply this to your data.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Awesome! That's exactly what I am looking for. Thanks!

amitchandak
Super User
Super User
Greg_Deckler
Super User
Super User

@hcze - Take a look at this: https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/...

 

I realize that your goal is slightly different. However, I think you should be able to achieve your goals by using the disconnected table trick to create a custom hierarchy as in the link above. It's just you would use that hierarchy on your rows instead of your columns.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks Greg.

 

I used that trick before but unfortunately I still need to be able to collapse/expand and that trick doesnt address that.

I am sure I am not the only one having this issue 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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