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,
Background:
I'm currently working on a P&L Statement report in Power BI.
To illustrate, I have a column called [P&L Line] with the account name, and [Current Estimate] with the latest forecast for that P&L line.
I have created a calculated measure in order to calculate each P&L Line as a % of net sales:
Current Estimate %NS = DIVIDE(SUM(CPM[Current Estimate]),CALCULATE(SUM(CPM[Current Estimate]),CPM[P&L Line]= "Total Net Sales"))
When I create a matrix with [P&L Line] in the rows and [Current Estimate %NS] in the values it works exactly as intended.
Here is the complication:
I created a hierarchy of [P&L Line] so that users can drill down into the account level of detail needed. To illustrate, suppose there are two [P&L Line] values, Digital Advertising and Traditional Advertising. I have created a seperate table with the hierarchisation:
[P&L Line Level 4] = Digital Advertising / [P&L Line Level 4] = Traditional Advertising
There would roll up into
[P&L Line Level 3] = Advertising
Which would roll up into
[P&L Line Level 2] = Direct Operating Expenses
And into
[P&L Line Level 1] = Total Operating Expenses
And I have created a relationship between the two tables.
The issue that has arisen is that when I create a matrix with [P&L Line Level 4] in rows, and [Current Estimate %NS] in the values, all values are equal to 0% except for Net Sales which is 100%.
Would anyone know the solution to this? Thank you.
@Anonymous , Not very clear. Refer if this can help
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
Hi @amitchandak ,
Thank you for your response.
I have the first table with the [P&L Line] and [Current Estimate].
I have the second table with [P&L Line Level 1], [P&L Line Level 2], [P&L Line Level 3], and [P&L Line Level 4].
[P&L Line] and [P&L Line Level 1] are related.
If I were to reword it, in a DAX formula, I would like to filter [Current Estimate] (which is in the first table) by [P&L Line Level 1], 2, 3 and 4 (which are in the second table).
Would you know how to do this? Let me know if I can clarify better in any way.
Thanks for the help.
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 |
---|---|
47 | |
26 | |
22 | |
12 | |
8 |
User | Count |
---|---|
76 | |
50 | |
46 | |
16 | |
12 |