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

Eliminate Duplicates

I'm pulling data from an SP list. The list is made up of qualifications and certifications (1989 - 2020). Some of the qualifications repeat, as the employee needs to requalify periodically (1 per yr, every 2 yrs, every 3 yrs), depending.

 

In Power Apps I have a condition that eliminates the duplication and only displays the most recent of those items that appear more than once on the list. 

 

Is there way to implement the same conditions to the data I'm pulling into my BI screen?

BI.PNG

16 REPLIES 16
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Can you show some sample data and expected result to us if you don't have any Confidential Information?

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

Here is another version of the slide I provided at the top.

 

The desire is to ensure all data section totals ONLY reflect the most recent/active/noncompliant of any document names that repeat in the SP List for each Member.

 

Shag-X_0-1608133709908.png

 

There was a recommedation that I try Fitler/First, but that was later determined to not be the answer, and that method only reconciles the 'first' not duplicates.

 

Shag-X_1-1608134047733.png

 

 

ChrisMendoza
Resident Rockstar
Resident Rockstar

I guess I do not understand the problem well enough. This is actully the picture I meant to upload.image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

Based on what I believe your are formula is suppose to do - or at least what I need your formula to do, the table on the bottom right should have three title, one of each, and that one should be the most recent of the two.

ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous - You mention using Power Apps, what is your function/formula that you are using to filter your Sharepoint List there?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

Here is the formula you requested. As written it only returns the most recent of those listed; those listed are the qualifications that repeat over years; however, for the Power BI screen the counts should only reflect the most recent of those qualifications, for all others will be 'Noncompliant' as a result of the date they were issued. Only one of each, whether compliant or not, should appear in the table and in the counts.

 

I'm using the following on screen Visible.

ClearCollect(
MemberCertificationandQualificationCollectionMostRecentOnly,
{Result: "Live Fire Refresher", Days: 720},
{Result: "Fitness Test", Days: 365},
{Result: "Self-Contained Breathing Apparatus Fit Test", Days: 365},
{Result: "Medical", Days: 1095}
);

So ONVISIBLE you create a table/collection:

Result Days
Live Fire Refresher 720
Fitness Test

365

Self-Contained Breathing Apparatus Fit Test 365
Medical 1095

and then you do what? Do you compare TODAY( ) to 'Sharepoint List'[LastCertificationDate]? How are you filtering the Sharepoint List in Power Apps? Knowing that will help us help you.

 

 

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

The Gallery filter is:

 

Filter(ForAll(Distinct(MemberCertificationandQualificationCollection,CQTitle),LookUp(Sort(Filter(MemberCertsandQualsList,(DteofCQ>=DatePicker1.SelectedDate)&&(DteofCQ<=DatePicker2.SelectedDate)&&FullNm=ECMemberSearchDD.Selected.FullNm),DteofCQ,Descending),CQTitle=Result)),!IsBlank(CQTitle))

Something like Adding a RELATED COLUMN

relatedDaysColumn = RELATED('Table'[Days])

and a Measure

Measure = 
VAR __temp = DATEDIFF(SELECTEDVALUE(Table2[LastQualification]), TODAY(),DAY)
RETURN
CALCULATE(
    COUNT(Table2[employee]),
    FILTER(Table2,Table2[relatedDaysColumn] <= __temp
    )
)

image.png

Providing data would help us in coming up with a solution.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

There is already a 'DaystoRenewal' column in the List that looks just like what you created.

mahoneypat
Employee
Employee

Pull down the arrow on Count of Park and choose distinct count instead.  Use a column there that has the values you want the distinct count of (e.g., name or personID).  Later, much more is possible when you start learning to write and use measures instead of the default aggregations.

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

I'm sure I have much to learn and enjoy. I've heard it from the Power Apps geek, the SharePoint geek, now a magnanimous Power BI person. 😁

 

I opened the 'Count of Park', couldn't find a 'distinct' option. Also, my concern is not a repretition at the park level or of the park names themselves, it is with the CQTitles. For example the system is storing all Fitness Test; a member has to pass a Fitness Test every year. I only want the BI graph to query and return data on the Member's most recent, not all of their Fitness Test. Here is in opened CQTitle. Should I make your recommended change here? If yes, what/how? Thanks!

 

Shag-X_0-1606962119594.png

 

Back to you 'pull down and pick" suggestion; won't that simply ONLY show me those that I've newly selected? Meaning, if any of the newly selected are repeats of the same CQTitle, just from an early year, they will still show up in the query based on this action, yes? Meaning I will still see every 'Fitness Test' associated with a Member if I only chose 'Fitness Test' as the "pull down" filter choice, yes? If yes, this is what I am trying to avoid. I DO NOT want the Region (PWR, NER, SER, etc.) Totals to include ANY duplicate 'qualifications' - only the most recent qualifications and all of the certifications (certifications are only issued once, so there would natually only be an impact of one on the total; whereas qualifications, if duplicates are not filtered out would have an impact of multiples.

All CQTitles of "Fitness Test", "Medical" and "Self-Contained Breathing Apparatus Fit Test" should only be counted once/the most recent; all other similar qualifications from earlier years should not factor in the overall "Compliance" totals?

I hope this makes sense.

mahoneypat
Employee
Employee

Please share your measure expression (or your selected aggregations in the visuals).  The visuals you've shown don't seem to have a Date axis/component.  I suspect you just need to use distinct count or DISTINCT() or VALUES() in your measures.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

I'm new to PowerBI and I'm not very familiar with many of the technical terms. I'm making it up as I go along. I hope this is what you requested.

 

Shag-X_0-1606952055500.png

 

Anonymous
Not applicable

I'm not measuring anything by date in PowerBI.

 

Its just a display counts performed in Power Apps or Sharepoint.

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.