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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jayendra
Frequent Visitor

how to get the latest updated key ?

Hi

 

I have 2 tables 1 is get issues and 2 is project in getissues tables contains updated,issuekey and substream in project table contains project and agilekeys column. i want to get the latest updated issuekey.But the table should contains substream,project and agilekeys.Is their any DAX formula or Power query function Please ASAP.

 

Regards

jayendra

9 REPLIES 9
v-shex-msft
Community Support
Community Support

Hi @jayendra,

 

Can you please share some sample data to test? If you have trouble to share the data, please provide the table structure to analysis.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi

 

Here i am providing the data can you see that in issue key some unique names are their. Actually my requirment is in Project Key column multiple keys is their and substream also like that,But in Issuekey Column  in Project 1 has 3 different keys are their i want the lastest updated key In issue key column AACEMTEFB-53 is the lastest key like i want the latest updated issuekeys.

 

Project Key                             SubStream                      Issuekey

===========                  =========                  ==============

Project1                                AA:Analytics                      AACEMFLXRP-9

Project1                                AA:Analytics                      AACEMTEFB-53

Project1                                AA:Analytics                      AACEMTEFB-9

Project2                                AA:NetAct                         AAIDEAUAT-437

Project2                                AA:NetAct                         ADIFNADRUP-1 

Project2                                MN:TC-VM                        AFRIMAXNIB-9

Project2                                MN:AMS                           AMSKPGWFO-9

Project2                                AMS:WEBAPP                   AMSKPGWTHR-9

Project3                                MN:COSS                          AMSKPGWTHR-29  

Project4                                MN:SDM                          AMSPAS-99

Project4                                AA:CloudIOT                   AMSWIFI-9

Project5                                MN:SDM                         AOCFEECZEC-9

Project5                               AA:CloudIOT                    AOCFEECZEC-78           

Project6                              AMS:WEBAPP                      ATTHOT-1

 

 

 

OutPut

 

Project Key                             SubStream                      Issuekey

===========                  =========                  ==============

Project1                                AA:Analytics                      AACEMTEFB-53

Project2                                AA:NetAct                         AAIDEAUAT-437

Project2                                MN:TC-VM                        AFRIMAXNIB-9

Project2                                AMS:WEBAPP                   AMSKPGWTHR-9

 

Like wise i have to get the Substream Column  should be unique keys  and Issuekey Column should be Unique and it should be latest modified key.

 

jayendra

kaushikd
Resolver II
Resolver II

@jayendra

Could you please show the data what you have and manually show what should be your output.

Hi

 

Here i am providing the data can you see that in issue key some unique names are their. Actually my requirment is in Project Key column multiple keys is their and substream also like that,But in Issuekey Column  in Project 1 has 3 different keys are their i want the lastest updated key In issue key column AACEMTEFB-53 is the lastest key like i want the latest updated issuekeys.

 

Project Key                             SubStream                      Issuekey

===========                  =========                  ==============

Project1                                AA:Analytics                      AACEMFLXRP-9

Project1                                AA:Analytics                      AACEMTEFB-53

Project1                                AA:Analytics                      AACEMTEFB-9

Project2                                AA:NetAct                         AAIDEAUAT-437

Project2                                AA:NetAct                         ADIFNADRUP-1 

Project2                                MN:TC-VM                        AFRIMAXNIB-9

Project2                                MN:AMS                           AMSKPGWFO-9

Project2                                AMS:WEBAPP                   AMSKPGWTHR-9

Project3                                MN:COSS                          AMSKPGWTHR-29  

Project4                                MNSmiley FrustratedDM                          AMSPAS-99

Project4                                AA:CloudIOT                   AMSWIFI-9

Project5                                MNSmiley FrustratedDM                         AOCFEECZEC-9

Project5                               AA:CloudIOT                    AOCFEECZEC-78           

Project6                              AMS:WEBAPP                      ATTHOT-1

 

 

 

OutPut

 

Project Key                             SubStream                      Issuekey

===========                  =========                  ==============

Project1                                AA:Analytics                      AACEMTEFB-53

Project2                                AA:NetAct                         AAIDEAUAT-437

Project2                                MN:TC-VM                        AFRIMAXNIB-9

Project2                                AMS:WEBAPP                   AMSKPGWTHR-9

 

Like wise i have to get the Substream Column  should be unique keys  and Issuekey Column should be Unique and it should be latest modified key.

 

jayendra

Hi @jayendra,

 

You can take a look at below sample to achieve your requirement:

 

1. Add a calculated column to original table to store the update id.

ID = RIGHT([Issuekey],LEN([Issuekey])-FIND("-",[Issuekey],,0)) 

9.PNG

 

2. Use ID to summary table and get the last update records.

Table = 
var temp=
ADDCOLUMNS(
    ADDCOLUMNS(
        SUMMARIZE(Test,[SubStream],"IssueID",MAX(Test[ID])),
        "IssueKey",LOOKUPVALUE(Test[Issuekey],[SubStream],[SubStream],[ID],[IssueID])),
    "Project Key",LOOKUPVALUE(Test[Project Key],[SubStream],[SubStream],Test[Issuekey],[IssueKey])
    )
return
SELECTCOLUMNS(temp,"Project Key",[Project Key],"SubStream",[SubStream],"IssueKey",[IssueKey])

10.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

HI

 

 

I  am only getting Substream values but not getting ProjectKey and Issuekey,Colud you help,how to resolve.If i place the ID column i am getting error

 

UniqueColumns err.png

 

If i remove the ID column i am getting the Substream values please see the below screen shot.


UniqueColumns.png

 

Regards

jayendra

Hi @jayendra,

 

Did you have any progress of this issue?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

HI @jayendra.

 

Can you please share more detail about your scenario?(screenshots, formula...)

BTW, can you confirm id column is number type? if it store the text value, the formula will got the error.

 

Regards,

XiaoxinSheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

BI eror.png

 

Lets look in this pic here substream is column AMS:WebAPP is new key like we have so many updated keys is their.we have to get the latest updated key in another table.IN get issues table i have updated column is their with the help of that one how can i get the latest updated key column.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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