web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Shuffle but do not rep...
Power Apps
Unanswered

Shuffle but do not repeat the same names etc

(0) ShareShare
ReportReport
Posted on by 102

Hi there

 

I have an app where it gets data from a sharepoint list and shuffles between the data. Below is the current formula used to shuffle the data for the first month then go to previous months. Issue is, that it is showing the same name multiple times for that month. I want to be able to shuffle through the first month and not have the same data show up and then moves onto the previous month.

For example names are sam, susan, grace, daphe, ava, when i press shuffle i want to only see their names once during the shuffle for that month and then go to previous months if no data for current month.

 

ClearCollect(ShuffledNames,Shuffle(If(IsBlank(LookUp('Appreciation - National Operations','Date of mention'>=Date(Year(Today()),Month(Today()),1))),Filter('Appreciation - National Operations','Date of mention'>=DateAdd(Date(Year(Today()),Month(Today()),1),-1,TimeUnit.Months)),Filter('Appreciation - National Operations','Date of mention'>=Date(Year(Today()),Month(Today()),1)))))

Categories:
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @BianceBee ,

     

    Please try to use distinct function.

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-distinct#example

     

    Best Regards,

    Wearsky

  • BianceBee Profile Picture
    102 on at

    Hi @v-xiaochen-msft 

     

    thanks but how will that work with the shuffle function? I want to shuffle the current months without repeating the names and then move to the previous months if there is no data for current month. The shuffling from current to previous is working but its repeating data from current month.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @BianceBee ,

     

    Try this

    ClearCollect(ShuffledNames,Distinct(
    
    Shuffle(If(IsBlank(LookUp('Appreciation - National Operations','Date of mention'>=Date(Year(Today()),Month(Today()),1))),Filter('Appreciation - National Operations','Date of mention'>=DateAdd(Date(Year(Today()),Month(Today()),1),-1,TimeUnit.Months)),Filter('Appreciation - National Operations','Date of mention'>=Date(Year(Today()),Month(Today()),1))))
    ,<Column Name>)
    )

     

    Best Regards,

    Wearsky

  • BianceBee Profile Picture
    102 on at

    Hi @v-xiaochen-msft 

    I have tried this and had no luck. No data is appearing in the gallery. I tried different columns but still, no data appeared in the gallery. The gallery comes up blank with no errors. Below is the data that is suppose to appear up in the gallery

    BianceBee_0-1702502044982.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard