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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
giramswa
Helper II
Helper II

Compare two rows of same column of one table and return only the difference

Hi All,

 

I have Monthly_Project_Summary_History table as shown below:

 

SNAPSHOT_WEEKSUMMARYauthorsummary_author_emailProject_ID
May 29, 2010Old SummaryAbc Xyzabc.xyz@company.comP_1
June 29, 2010Old SummaryAbc Xyzabc.xyz@company.comP_1
July 29, 2010New SummaryAbc Xyzabc.xyz@company.comP_1
August 29, 2010New SummaryAbc Xyzabc.xyz@company.comP_1
September 29, 2010Final SummaryNop Qrsnop.qrs@company.comP_1

 

Above is an example of records for a single project.
This table captures monthaly summary of every Open project. I need to create a report to show Summary on only those snapshot_week when the Summary was changed. So expected outcome is as below:

SNAPSHOT_WEEKSUMMARYauthorsummary_author_emailProject_ID
May 29, 2010Old SummaryAbc Xyzabc.xyz@company.comP_1
July 29, 2010New SummaryAbc Xyzabc.xyz@company.comP_1
September 29, 2010Final SummaryNop Qrsnop.qrs@company.comP_1

 

How to achieve this?

1 ACCEPTED SOLUTION

hi @giramswa 

if that is the case, try to create a calculated table like this:

SumTable =
ADDCOLUMNS(
    SUMMARIZE(
        TableName,
        TableName[Summary],
        TableName[author],
        TableName[summary_author_email],
        TableName[Project_ID]
    ),
    "SNAPSHOT_WEEK",
    CALCULATE(MAX(TableName[SNAPSHOT_WEEK]))
)
 
i tried and it worked like this:
FreemanZ_0-1673008193733.png

 

View solution in original post

7 REPLIES 7
Gokul_G16
Resolver I
Resolver I

Hey @giramswa ,


According to you request for this you can dynamically douvable from Power Query only.
Step 1; Concatenate =
Date  & Summary & Author ID.

Step 2; remove duplicates.
Just select the concatenate column and then click the Re-Duplicate.

Step 3;
Close and apply. 
finally you got it.


Thanks 
Gokul.

My table is Calculated table (created via DAX by joining other two tables and selecting only required columns), so I cannot go to Power Query editor for this. Thats why I am looking for a DAX to achieve final solution.

FreemanZ
Super User
Super User

hi @giramswa 

what do you mean by "change" in "show Summary on only those snapshot_week when the Summary was changed"?

Hi @FreemanZ 

If you look at SUMMARY column in my table, values are same for first two months and then they are same for third are fourth month. I want to shows rows with unique SUMMARY on my report.

 

hi @giramswa 

if that is the case, try to create a calculated table like this:

SumTable =
ADDCOLUMNS(
    SUMMARIZE(
        TableName,
        TableName[Summary],
        TableName[author],
        TableName[summary_author_email],
        TableName[Project_ID]
    ),
    "SNAPSHOT_WEEK",
    CALCULATE(MAX(TableName[SNAPSHOT_WEEK]))
)
 
i tried and it worked like this:
FreemanZ_0-1673008193733.png

 

Thank you so much, this was really helpful.

hi @giramswa 

you may also plot a table visual with zero code. like this:

FreemanZ_0-1673008458133.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.