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
paulinasaez
New Member

Get a list of tasks that have changed its status within the last week

Hi everyone,

 

I need to get a list of tasks that were marked as completed within the last week. 

 

I take a snapshot of a tasks database every week, let's call them database1 (last week snapshot) and database2 (current week snapshot). Both databases have these columns: [Task name], [Status]

So, database1 (last week's) would have less amount tasks (less amount of rows because every day new tasks are added) and less tasks marked as completed than database2 (current week).

I've seen tutorials on comparisons but they're either for calculating an amount that's easily summed (like last year and current year sales) or work with transacional data, not "snapshots" of databases like I do. 

Any help will be greatly appreciated.

Thanks,

 

Paulina

9 REPLIES 9
Dhacd
Resolver III
Resolver III

Hi @danextian,

Are you using powerquery to bring the data to power bi. And if there is a key for all the tasks this can be achieved easily. 

Please provide a sample data set of db1 and db2.

Thanks and regards,
Atma.

Yes I'm using power query

 

The only key in Notion AFAIK is the name of the row (in this case, the task's name)

 

Here's some sample data:
For database1:

TaskStatus
1. task 1In Progress
2. task 2In Progress

 

For database 2:

TaskStatus
1. task 1In Progress
2. task 2Completed
3. task 3Next up

@paulinasaez ,

 

I believe you are appending the data to the existing table on a weekly basis right? Or Creating a new a new table for each snapshot?

Thanks and regards,

Atma.

I'm downloading the whole tasks database "as is", once a week. 

I'm not trasnforming/appending/merging anything yet as I don't know what to do.

@paulinasaez I believe the best architecture to use here keep all the excel files in a folder and use powerquery to load the data by appending the tables each week and renaming the table name with the week number or date you are downloading the data. Then keep the name of the table as a column inside the powerquery. After that, we can write a Conditional column to check the status. 

Regards,
Atma.

So with the given data, Task2 is the one completed in the current week from last week? If so, you can create a calculated column that looks up the current week's task in in last week's. 

CALC COLUMN =
VAR __LOOKUP =
    LOOKUPVALUE ( database1[task], database1[task], database2[task] )
RETURN
    IF ( ISBLANK ( __LOOKUP ), "RESULT1", "RESULT2" )

 










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I need to be able to find out which tasks were completed, just by comparing both datasets. 

I have hundreds of tasks.

 

Do your solution needs for me to input each task manually within the LOOKUPVALUE function? If that's the case, that wouldn't be possible.

danextian
Super User
Super User

Hi @paulinasaez ,

 

Doesn't your database have  a column that indicates when a task was completed? If it does, that can column can possibly be used.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

No it doesn't have a completed date/time column.
I'm handling a dataset that's built in Notion and it doesn't have this capability.

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.