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

Community site session details

Session Id : kR+mgx7hy1FziWjuZr38j+
Power Apps - Building Power Apps
Answered

Cross join or Cartesian Join of collections

Like (0) ShareShare
ReportReport
Posted on 6 Apr 2020 17:15:44 by

Hi,

 

Is it possible to do cross join or Cartesian join of two collections with no relation in Powerapps ?

 

Eg: Table 1 :

date

2020-04-01

2020-04-02

2020-04-03

 

Table 2 :

name

AA

BB

 

Expected result:

table 3:

date                name

2020-04-01     AA

2020-04-01     BB

2020-04-02    AA

2020-04-02    BB

2020-04-03     AA

2020-04-03     BB

 

I tried addcolumns, but it didn't work.

Any help would be great.

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 06 Apr 2020 at 17:57:38
    Re: Cross join or Cartesian Join of collections
    Thank you @Drrickryp! Means a lot coming from you!

    Thanks,
    Hardit Bhatia
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 06 Apr 2020 at 17:55:10
    Re: Cross join or Cartesian Join of collections

    Good Job @PowerAddict  for thinking outside the box.  

  • Verified answer
    PowerAddict Profile Picture
    7,314 Most Valuable Professional on 06 Apr 2020 at 17:42:48
    Re: Cross join or Cartesian Join of collections

    I created 2 collections: 

    ClearCollect(C1, {date1: "2020-04-01"}, {date1: "2020-04-02"}, {date1: "2020-04-03"});
    ClearCollect(C2, {name2: "AA"}, {name2: "BB"});

    Then I created a collection C3 with the following expression: 

    ForAll(C1, ForAll(C2, Collect(C3, {date3: date1, name3:name2})))

    This is how my collection looks like: 

    Join.JPG

     

    Let me know if this is what you were looking for. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 06 Apr 2020 at 17:36:46
    Re: Cross join or Cartesian Join of collections

    Hi @Anonymous 

    Unless there is either a 1:N or N:N relationship between the tables, I doubt that it is possible in PowerApps to create a join.  

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Loading complete