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
Anonymous
Not applicable

Calculated column on matching data

Hi,

 

I have to achieve below output in power BI,

 

Where i have the data like below screen shot in same table,

 

Column1      Column2           Measure

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

ABC                 XYZ                    59

EFG                 ABC                   10

 

and my requirement is to create new column or measure which gives measure value of column2, where it's matches the data with column1

 

required output is 

 

Column1      Measure        New Measure/Column

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

ABC                 59                    10

EFG                 10                     -

 

Please suggest 

 

Thanks,

Ganesh

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous

 

Try this calculated column.

Calculated = CALCULATE(MAX(Ex_earlier[Measure]),FILTER(Ex_earlier, Ex_earlier[Column2]=EARLIER(Ex_earlier[Column1])))

 

Ex_Earlier.PNG

 

Thanks

Raj

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous

 

Try this calculated column.

Calculated = CALCULATE(MAX(Ex_earlier[Measure]),FILTER(Ex_earlier, Ex_earlier[Column2]=EARLIER(Ex_earlier[Column1])))

 

Ex_Earlier.PNG

 

Thanks

Raj

Anonymous
Not applicable

Thanks Raj for looking into this.

 

In my real time scenarion, if i am taking aggragtion as SUM, It's working perfectly.

 

Best Regards,

Ganesh

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.