Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a simple calculation "Bad Marks":
IF(SUM([table].Value1) < SUM([table].Value2,1,0)
I also have a non balanced (ragged) parent child hierarchy:
ParentId | OrgId | OrgName |
1 | 1 | Company |
1 | 2 | Region 1 |
1 | 3 | Region 2 |
1 | 4 | Region 3 |
2 | 5 | Office 1 |
2 | 6 | Office 2 |
3 | 7 | Office 3 |
3 | 8 | Office 4 |
4 | 9 | Subregion 1 |
4 | 10 | Subregion 2 |
9 | 11 | Office 5 |
9 | 12 | Office 6 |
10 | 13 | Office 7 |
10 | 14 | Office 9 |
How do I calculate the number of lowest level children with "bad marks" for each node?
Something like
OrgName | No of bad marks |
Company | 6 |
Region 1 | 1 |
Region 2 | 4 |
Region 3 | 1 |
Subregion 1 | 1 |
Subregion 2 | 0 |
Regards John
Hello Greg,
Are you looking for this:
OrgStructure Table
ParentId OrgId OrgName
1 1 Company
1 2 Region 1
1 3 Region 2
1 4 Region 3
2 5 Office 1
2 6 Office 2
3 7 Office 3
3 8 Office 4
4 9 Subregion 1
4 10 Subregion 2
9 11 Office 5
9 12 Office 6
10 13 Office 7
10 14 Office 9
Values Table
OrgId Value1 Value2
5 1 2
6 2 1
7 3 4
8 4 5
11 4 6
12 7 8
13 19 12
14 4 10
Expected Output
Company , 3
Region 1,1
Office 1,0
Office 2,1
Region 2,0
Office 3,0
Office 4,0
Region 3, 1
Subregion 1 ,0
Office 5, 0
Office 6, 0
Subregion 2, 1
Office 7 , 0
Office 9 , 1
Regards John
@PH9Z I feel like I am missing some source data to be able to create the calculation. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |