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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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 1
lbendlin
Super User
Super User

Read about the EXCEPT() function in DAX.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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