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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
robertsbm
Frequent Visitor

Comparing two filtered text fields in the same table and displaying the differences

Hi there! I have two calculated text visuals (Source and Target) based on the same column (Version). They are both sliced differently. I want a third calculated column to display the differences from slicked Target to the sliced Source. The data and what I'd expect looks like this. I can't seem to figure out the correct DAX.

 

[Source]     [Target]     [Difference]

---------     ---------     ------------

|1111|         |0000|        |1111|

|2222|         |2222|

|3333|         |3333|

|4444|         |4444|

 

Thanks!

6 REPLIES 6
ChandeepChhabra
Impactful Individual
Impactful Individual

Can you elaroate the data a little more, may be share it

Thanks for your reply. I'll try adding more detail. There's a fourth table involved called environment. I have a slicer of it on the report twice. The first slicer (ENV1) affects the Source table, and the second slicer (ENV2) affects the Target table. I'm having trouble getting the difference (from Source and Target) to display in a third column.

 

                                         (w/ENV1 Filter)  (w/ENV2 Filter)

[ENV1]            [ENV2]            [Source]            [Target]            [Difference]

--------           --------            ---------            ---------           -------------

|Dallas|           |Chicago|          |1111|               |0000|              |1111|

                                               |2222|               |2222|

                                               |3333|               |3333|

                                               |4444|               |4444|

@robertsbm,

 

You may try EXCEPT Function and refer to this post.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The EXCEPT function appears to be used table to table, which I don't think applies here. Let me re-describe my use case.

 

The goal of the report is to display the software versions installed across multiple servers and display the differences. The data set is an single appended table from 16 individual Oracle connections. I have two calculated text columns (named Source and Target) that are both based on the same column (Version). They are both sliced by Environment. I want a third calculated column to display the differences between Target and Source. I'm having trouble with a custom filter seeing the passed in slicer (Environment) selections. Thanks!

Hi there! I have two calculated text visuals based on the same column (table "Source" and table "Target"), both filtered differently. I want a third calculated column to display the differences from Target to Source. The data and what I'd expect looks like this.

 

[Source]   [Target]     [Difference]

--------    --------      ------------

|1111|      |0000|        |1111|

|2222|      |2222|

|3333|      |3333|

|4444|      |4444|

 

Thanks!

Hardik
Continued Contributor
Continued Contributor

first of all change the data type of the columns from gtext to integer for subtraction by clicking on the modelling tab and later on write a dax query by creating a new column.Hope this helps !Screenshot_13.png

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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