The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have the following model, commonly used in software development:
Epic - 1:n - Story - 1:n - Task
I have another table with tests, and tests can be for tasks (unit tests) or story (integrations tests, system tests) or epic (e2e tests), and of course all relationship is many to many. I have an association table, where tests are connected to either task/story/epic and I have set up 3 relationship between Epic/Story/Task - 1:n - assoc - n:1 - Tests. The later one (Task - n:n - Tests) is active.
Now I need to count all tests cases under a specific epic/story/task by execution status:
Count of Tests = DistinctCount(Tests[Test ID])
And I used the matrix visualization with the Epic/Stroy/Task row hierarchy, status as columns and the above measure as values. With the above setup, those test cases which are for story of epic are not counted, because there is no active relationship for them, so I have created the following measure:
Count of Tests = DistinctCount(Tests[Test ID]) + CALCULATE(DistinctCount(Tests[Test ID]); USERELATIONSHIP(STORY-ASSOC)) + CALCULATE(DistinctCount(Tests[Test ID]); USERELATIONSHIP(EPIC-ASSOC))
This now calculates properly the number of tests, but when calculating the totals, I mean the grand total, it gives me back 3 times the number of all tests.
How can I solve this issue? Also there are empty rows for tests that cannot be assigned to any rows:
Can I somehow get rid of that? I can remove those with filters, but then the number of tests are lower than it should be.
Hi @Anonymous,
Could you post your table structures with some sample/mock data and the expected result, so that we can better assist on this issue? It's better to share a dummy pbix file which can reproduce the issue. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Regards
Hi @v-ljerr-msft,
Company policy does not allow us to use onedrive to share, so here is another link: http://s000.tinyupload.com/index.php?file_id=53465670233810222567
Hope it helps clarify the situation.
Szabolcs
Hello @v-ljerr-msft,
I have not managed to solve this issue yet, do you have any suggestions?
Br,
Szabolcs
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |