web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
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.

I have the same question (0)
  • 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

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading complete