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
Anonymous
Not applicable

Rate of Hardware Second Return

Please help a newbie here.

 

i need to create a measure to calculate how many hardware that was return in the last month (lastdate) has also been returned in the last three months (lastdate - 3 months)

 

below will be the formula,

 

count distinct hardware returned in the last month ( that is also returned within the last three months) to be divided to the count of total hardware returned in the last month

 

Thanks in advance,

2 ACCEPTED SOLUTIONS

Hi @Anonymous

 

2. find the serial numbers that has duplicate based on "serial number" Fault Code" 

 

If I get this right, the duplication is based on the combination of both serial number and fault code (failure code in your table). A serial number is not yet considered a duplicate if the fault code is different. Also, you want to know which serial numbers are duplicates? Correct? If so, here's my solution. 

https://drive.google.com/open?id=1oCwqy9p_d6-tOabQ7s4LXyd8H3BoUrII










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.

View solution in original post

Hi @Anonymous

 

Understood - have updated the file at the same dropbox link.

 

I created another measure to user in the matrix for this purpose. At least this works, but there may well be better ways to write it.

Serial Numbers Returned Summed Monthly (only if Second Return in Most Recent Month ) =
VAR LatestMonth =
    CALCULATETABLE ( LASTDATE ( 'Calendar'[Month] ), ALLSELECTED ( 'Calendar' ) )
RETURN
    SUMX (
        SUMMARIZE (
            'Defect Found',
            'Calendar'[Month],
            'Defect Found'[Serial Number],
            'Defect Found'[Failure Code]
        ),
        IF (
            NOT ( ISBLANK ( CALCULATE ( [Serial Numbers Second Return], LatestMonth ) ) ),
            [Serial Numbers Returned in Most Recent Month]
        )
    )

Using this measure in a matrix, you can see when the 164 "Second Returns" in March were returned in earlier months.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

17 REPLIES 17

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.