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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Profit and Loss problems

Hello,
I have a problem with my profit and loss calculation. For these I have an account hierarchy with a handful of special cases. In theory, it can be booked to all accounts. However, due to the hierarchical structure, some accounts are also under accounts from the upper ones. Furthermore, individual accounts can have several different parents, and the weighting in the parents can be with different signs.
Example (1): Account A11 (level 3) is to be included in A1 (level 2) negatively and in B1 (level 2) positively.
Example (2): Account A113 (level 4) is to be posted positively. However, the value in A13 (level 3) is to be displayed as negative.

grafik.png

 

I was able to solve problem 1 with SUMX by summing up the account bookings using the row context. However, an incorrect value is displayed for the postings from A13, since A113 is positively and only gets the negative sign with A13. In the rowcontext, however, the corresponding booking is not displayed (since it has a positive weighting for the line from A113 is).grafik.png

 

In this example, a different +/- sign should have been used since the weighting of A13 is -1.

 

I have enclosed all the bookings.

grafik.png

 

i am grateful for any help

 

Bruening

1 REPLY 1
Anonymous
Not applicable

Here's one article about hierarchy handling: https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/

and here's another one that uses the new ISINSCOPE function to simplify things:

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

Best
D

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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