Forum Discussion

Aladin46's avatar
Aladin46
Frequent Visitor
3 years ago
Solved

Browsing through duplicated records

Hi all,

 

I'm trying to work out something that looks simple but ends up tricky... Wouldn't be fun otherwise right?

I'm having a table with let's say a list of documents with 4 basic columns: doc ID (Column A), doc Rev# (Column B), submission date (Column C) and review date (Column D).

 

What I'm looking for is to filter (using a measure or an additional column in Power BI) the docs that have been submitted (so there is a value in Column C), reviewed (a value in Column D), but haven't been resubmitted (meaning the Rev# has not be incremented yet) within 'X' days. Eventually, a slicer (in calendar days) would be used to dynamically filter the docs based on the response time to release Revision N+1 once Revision N has been reviewed. Then an additional filter to remove all 'outdated' Revisions (i.e. only keep the current revision) would do the trick to get a clean state but that'll be the icing on the cake...

 

As I said, quite a common situation when it comes to doc control but I'm stuck when trying to code it in DAX... I also thought of using M with a Table.Buffer to run some scenarios where I got rid of latest Rev# and then focused of the remaining docs but didn't go far.

 

Cheers,

Aladin

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Aladin46 ,

    I created some data:

    Do you want to use the dax to display data that is not outdated, you can use the IF function to mark it, and then put it in the Filter setting to display the data.

    Here are the steps you can follow:

    1. Create measure.

    Flag =
    IF(
        MAX('Table'[Date])>=TODAY(),1,0)

    2. Place [Flag]in Filters, set is=1, apply filter.

    3. Result:

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Aladin46 ,

    I created some data:

    Do you want to use the dax to display data that is not outdated, you can use the IF function to mark it, and then put it in the Filter setting to display the data.

    Here are the steps you can follow:

    1. Create measure.

    Flag =
    IF(
        MAX('Table'[Date])>=TODAY(),1,0)

    2. Place [Flag]in Filters, set is=1, apply filter.

    3. Result:

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Aladin46 Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.