cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Frequent Visitor

Compare two filtered text columns and return the differences

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!

Highlighted
Solution Specialist
Solution Specialist

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

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

Highlighted
Continued Contributor
Continued Contributor

Re: Compare two filtered text columns and return the differences

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

Highlighted
Frequent Visitor

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

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|

Highlighted
Community Support
Community Support

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

@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.
Highlighted
Frequent Visitor

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

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!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors