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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors