Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Comparing Test Cases Between Different Versions in Power BI

Title: "Comparing Test Cases Between Different Versions in Power BI"
3 hours ago

I have a dataset with two columns: "Test Case" and "Version."

  • Different versions can contain the same or different test cases.
  • In Power BI, I've created a matrix to display test cases for different versions side by side.
  • I also have a slicer that allows users to select two versions for comparison.
  • Let's say Version 1.1 is the older version, and Version 1.2 is the newer one.
  • I want to know how to:
    1. Generate a table or use another method to display a list of test cases that have been removed from Version 1.2 compared to Version 1.1.
    2. Generate a table or use another method to display a list of test cases that have been added to Version 1.2.
    3. Generate a table or use another method to display a list of test cases that are common to both Version 1.1 and Version 1.2.

here is my current solution but the list it return can not be displayed in a table, only showing as a string list can be displayed as a value in a matrix table. 

 

RemovedTestCases =
VAR SelectedVersions = VALUES('data'[Version])
VAR SelectedVersionCount = COUNTROWS(SelectedVersions)

RETURN
IF(
    SelectedVersionCount = 2,
    VAR SelectedVersionA = MINX(SelectedVersions[Version])
    VAR SelectedVersionB = MAXX(SelectedVersions[Version])
    VAR RemovedTestCasesList =
        EXCEPT(
            VALUES('data'[Test Case]),
            CALCULATETABLE(
                VALUES('data'[Test Case]),
                'data'[Version] = SelectedVersionB
            )
        )
    RETURN
    CONCATENATEX(RemovedTestCasesList'data'[Test Case]UNICHAR(10),
    BLANK()
)

)
 
here is the sample data: 
Test CaseVersion
A1.1Version 1.1
A1.2Version 1.1
A1.3Version 1.2
A1.2Version 1.2
A1.1Version 1.3
A1.6Version 1.3
A1.2Version 1.3
  

 

Any recommendations on how to solve the problem? Many thanks!

1 Reply