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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JeevanMallya
Resolver I
Resolver I

Copy new Column value from one Table to another when there is exact match with all other column valu

I have a Table called SPRINT_MASTER where ISSUE_KEY appear multiple times in different sprints

PROJECT_KEYBOARD_NAMEISSUE_KEYSPRINT_NAMESPRINT_NUMBERINITIAL_ESTIMATECURRENT_ESTIMATESPRINT_REPORT_STATUSIS_ADDED_DURING_SPRINTSTORY_POINTS_COMMITTEDSTORY_POINTS_EXTRA_PULLEDSTORY_POINTS_COMPLETEDSTORY_POINTS_EXTRA_COMPLETEDSTORY_POINTS_NOT_COMPLETEDSTORY_POINTS_REMOVEDISSUE_TYPE_NAMEISSUE_STATUS_NAMEPRIORITYRESOLUTIONCREATEDDetailed_Affected_VersionStory_PointsTask_TypeSTATESTART_DATEEND_DATECOMPLETE_DATESTORY_COMITTEDSTORY_POINTS_COMMITED_START
ABCABC Scrum BoardABC-473ABC Sprint 313133INCOMPLETEDFALSE30nullnull30StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed06-05-2024 13:00:50 +00:0024-05-2024 17:00:00 +00:0027-05-2024 06:32:08 +00:0013
ABCABC Scrum BoardABC-473ABC Sprint 323233INCOMPLETEDFALSE30nullnull30StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed27-05-2024 13:58:34 +00:0014-06-2024 18:00:00 +00:0015-06-2024 10:09:34 +00:0013
ABCABC Scrum BoardABC-473ABC Sprint 333333COMPLETEDFALSE303000StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed17-06-2024 13:01:04 +00:0005-07-2024 19:00:00 +00:0008-07-2024 07:08:23 +00:0013

 

I have another Table called UNIQUE_STORY_POINTS where i have considered only ISSUE_KEY once.In this Table there is an new column called TOTAL_UNIQUE_STORY_POINTS. I want to copy the new Column to SPRINT_MASTER Table on condition that all Column Values in Specific Rows should match and where there is no match add zero. Something like below

 

PROJECT_KEYBOARD_NAMEISSUE_KEYSPRINT_NAMESPRINT_NUMBERINITIAL_ESTIMATECURRENT_ESTIMATESPRINT_REPORT_STATUSIS_ADDED_DURING_SPRINTSTORY_POINTS_COMMITTEDSTORY_POINTS_EXTRA_PULLEDSTORY_POINTS_COMPLETEDSTORY_POINTS_EXTRA_COMPLETEDSTORY_POINTS_NOT_COMPLETEDSTORY_POINTS_REMOVEDISSUE_TYPE_NAMEISSUE_STATUS_NAMEPRIORITYRESOLUTIONCREATEDDetailed_Affected_VersionStory_PointsTask_TypeSTATESTART_DATEEND_DATECOMPLETE_DATESTORY_COMITTEDSTORY_POINTS_COMMITED_STARTTOTAL_UNIQUE_STORY_POINTS
ABCABC Scrum BoardABC-473ABC Sprint 313133INCOMPLETEDFALSE30nullnull30StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed06-05-2024 13:00:50 +00:0024-05-2024 17:00:00 +00:0027-05-2024 06:32:08 +00:00130
ABCABC Scrum BoardABC-473ABC Sprint 323233INCOMPLETEDFALSE30nullnull30StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed27-05-2024 13:58:34 +00:0014-06-2024 18:00:00 +00:0015-06-2024 10:09:34 +00:00130
ABCABC Scrum BoardABC-473ABC Sprint 333333COMPLETEDFALSE303000StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed17-06-2024 13:01:04 +00:0005-07-2024 19:00:00 +00:0008-07-2024 07:08:23 +00:00133

Can you please help

1 ACCEPTED SOLUTION
JeevanMallya
Resolver I
Resolver I

Thank you very much.It worked

View solution in original post

4 REPLIES 4
JeevanMallya
Resolver I
Resolver I

Thank you very much.It worked

JeevanMallya
Resolver I
Resolver I

I had followed the step mentioned earlier as well but didnt get the results since TOTAL_UNIQUE_STORY_POINTS values get added to other columns as well instead of null or zero. I wanted it to copy only to specific Column where all Row value matches specifically sprint number.

In Table SPRINT_MASTER ISSUE_KEY appear more than once but in UNIQUE_STORY_POINTS Table i have built logic to consider it once and built a new column TOTAL_UNIQUE_STORY_POINTS column to calculate story points. So ideally when i merge or add this column to Sprint Master, i want this value to be added to specific row rather than duplicating it to other colums of issue_key.

  • Highlisht the SPRINT_MASTER table
  • Go to the ribbon > Home > Merge Queries
  • Select the Issue Key in Both tables
  • Expand the UNIQUE_STORY_POINTS column only
  • Highlight the expaned column and in the ribbon choose Replace Values
  • Enter null in the first field and then 0 in the below field
  • Load the table
PROJECT_KEYBOARD_NAMEISSUE_KEYSPRINT_NAMESPRINT_NUMBERINITIAL_ESTIMATECURRENT_ESTIMATESPRINT_REPORT_STATUSIS_ADDED_DURING_SPRINTSTORY_POINTS_COMMITTEDSTORY_POINTS_EXTRA_PULLEDSTORY_POINTS_COMPLETEDSTORY_POINTS_EXTRA_COMPLETEDSTORY_POINTS_NOT_COMPLETEDSTORY_POINTS_REMOVEDISSUE_TYPE_NAMEISSUE_STATUS_NAMEPRIORITYRESOLUTIONCREATEDDetailed_Affected_VersionStory_PointsTask_TypeSTATESTART_DATEEND_DATECOMPLETE_DATESTORY_COMITTEDSTORY_POINTS_COMMITED_STARTUNIQUE_STORY_POINTS.TOTAL_UNIQUE_STORY_POINTS
ABCABC Scrum BoardABC-473ABC Sprint 313133INCOMPLETEDFALSE30nullnull30StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed06-05-2024 13:00:50 +00:0024-05-2024 17:00:00 +00:0027-05-2024 06:32:08 +00:00133
ABCABC Scrum BoardABC-473ABC Sprint 323233INCOMPLETEDFALSE30nullnull30StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed27-05-2024 13:58:34 +00:0014-06-2024 18:00:00 +00:0015-06-2024 10:09:34 +00:00133
ABCABC Scrum BoardABC-473ABC Sprint 333333COMPLETEDFALSE303000StoryClosedMajorFixed22-09-2022 11:14:16 +00:00null3nullclosed17-06-2024 13:01:04 +00:0005-07-2024 19:00:00 +00:0008-07-2024 07:08:23 +00:00133

 

Can you please help.

If you are using the Power Query solution, you can merge on multiple columns. If the same columns are in each table.

 

This is important, highlight the columns you want to merge on in the same order! Example:

  • Highlight SPRINT_MASTER
  • Merge Queries
  • In the SPRINT_MASTER highlight the ISSUE_KEY, hold CTRL on your keyboard and choose the other columns
  • In UNIQUE_STORY_POINTS highlight the same columns in the same order

 

DAX Solution

 

Unique Story Points =
IF(
CALCULATE(
    MAX(UNIQUE_STORY_POINTS[TOTAL_UNIQUE_STORY_POINTS])
    ,UNIQUE_STORY_POINTS[ISSUE_KEY] = [ISSUE_KEY]
   && UNIQUE_STORY_POINTS[SPRINT_NUMBER] = [SPRINT_NUMBER]) ) 
= BLANK(), 0 ,
CALCULATE(
    MAX(UNIQUE_STORY_POINTS[TOTAL_UNIQUE_STORY_POINTS])
    ,UNIQUE_STORY_POINTS[ISSUE_KEY] = [ISSUE_KEY]
     && UNIQUE_STORY_POINTS[SPRINT_NUMBER] = [SPRINT_NUMBER]) 
)



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Joe_Barry
Super User
Super User

Hi @JeevanMallya 

I hope I understood you questions correctly.

 

Why don't you create a one to many relationship between from UNIQUE_STORY_POINTS  table  ISSUE_KEY column  to the SPRINT_MASTER ISSUE_KEY column?

If you create a Matrix visual add all the columns from SPRINT_MASTER and then add the TOTAL_UNIQUE_STORY_POINTS column from UNIQUE_STORY_POINTS, you will get the result you need.

 

You can do measures if you want to use the column for calculations.

 

Otherwise, if you need to have it in the table you can use DAX

 

 

Unique Story Points =
IF(
CALCULATE(
    MAX(UNIQUE_STORY_POINTS[TOTAL_UNIQUE_STORY_POINTS])
    ,UNIQUE_STORY_POINTS[ISSUE_KEY] = [ISSUE_KEY]) 
= BLANK(), 0 ,
CALCULATE(
    MAX(UNIQUE_STORY_POINTS[TOTAL_UNIQUE_STORY_POINTS])
    ,UNIQUE_STORY_POINTS[ISSUE_KEY] = [ISSUE_KEY]) 
)

 

 

You can also merge the tables in Power Query

  • Highlisht the SPRINT_MASTER table
  • Go to the ribbon > Home > Merge Queries
  • Select the Issue Key in Both tables
  • Expand the UNIQUE_STORY_POINTS column only
  • Highlight the expaned column and in the ribbon choose Replace Values
  • Enter null in the first field and then 0 in the below field
  • Load the table

 

Hope this helps

Joe

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors