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,
I'm trying to build a Profit and Loss report. Information is groupped/organised in different levels and these may have x or y sub-levels.
at the end, the 4digit accont number must be shown.
this means tha in some cases, the account must be shown at a 3rd (x) info level, other times at 4th (y) info level.
this makes it really difficult to me to crear a master table.
I thought that using hierarchies (putting one into another) would help, but I can't see a way to do it.
is it possible? if so.. how?
thanks a lot in advance
Solved! Go to Solution.
Hi @nieps
Do you mean you'd like to set your original data transformed as the solution 2? Move the right column value to fill the left empty one?
You might try the power query something like this:
= Table.ReplaceValue(#"Changed Type","",each [B],Replacer.ReplaceValue,{"A"})
Hi @nieps ,
You can have a look at the below videos to create and manage hierarchy
https://www.youtube.com/watch?v=oEOaqyaZTZw
https://www.youtube.com/watch?v=MK1jwHz8hoc
Regards,
HN
@nieps , Not very clear. Can you share sample data and sample output in table format?
But refer if this can help
https://community.powerbi.com/t5/Desktop/Traditional-Financial-Statements/td-p/7223
https://grantthornton.eu/2019/08/07/profit-and-loss-statement-power-bi/
https://www.thebiccountant.com/2017/01/16/easy-profit-loss-and-other-account-statements-part2/
@nieps you cannot merge two hierarchies but you can add more column to your existing one. not sure if this answered your question.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
thanks for your answer, @parry2k
I've already built my report the way you propose, but I don't really like the result (which I call "the quick and dirty solution").
@amitchandak I'll have a look at the links you shared.
in the meanwhile, I'll try to show you where my problem lays
Solution 1: the Q&D one which I'm already using
using this data structure as 'master data', I can create a hierarchy putting all levels and account column under Level 0
but, when creating the report (list), and you do the drill down, you'll find that in some cases you've got to drill 'empty' levels down until you get the account (eg. all lines in the table with empty fields)
Solution 2:
whit this data structure I can also create a hierarchy in powerBI, and the report looks perfect! but it's really hard to handle and mantain in a regular basis, even more if I whant this table to be updated with an automatism.
any other idea or suggestion?
thank you guys!
Hi @nieps
Do you mean you'd like to set your original data transformed as the solution 2? Move the right column value to fill the left empty one?
You might try the power query something like this:
= Table.ReplaceValue(#"Changed Type","",each [B],Replacer.ReplaceValue,{"A"})
hi @v-diye-msft ,
your proposal looks good.
I wanna try it, but I'm not sure where to use the formula. you mean when I load the data and "transform" it via power query?
by the way, would this solution work even if I need to apply this formula to several columns?
I mean, as it is shown in the pics of my previous post, there are several levels; in fact, in my pics, there is one more level missing. (hu hu!)
Hi @nieps
I wanna try it, but I'm not sure where to use the formula. you mean when I load the data and "transform" it via power query?
Yes.
by the way, would this solution work even if I need to apply this formula to several columns?
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |