cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Alisina Member
Member

counting rows from another table in Power Query (NOT DAX)

table1.PNG

 

Figure 2:
calculate.PNG

Figure 3:

table2.PNG

 

I have this table Figure 1, which I need to generate a new column able to count rows from another column(another table i.e. Figure 3) in power query similar to using the calculate function in DAX shown in Figure 2.

In the end the counted rows in the Figure 1 (Table 1) will be unpivoted.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: counting rows from another table in Power Query (NOT DAX)

Hi @Alisina 

 

Ok, just follow the steps below.

1.  While in Table1, go to Home ribbon and click on Merge Queries.
2. Select Table2 and dates on both tables as below, this will add an extra column with Tables in it.

image.png

3. Click on double arrow in your new column and follow the setup below.
image.png
 
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

5 REPLIES 5
Super User
Super User

Re: counting rows from another table in Power Query (NOT DAX)

Hi @Alisina 

 

can you provide a small data samples reflecting both tables structure and based on this sample an expected outcome?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

Alisina Member
Member

Re: counting rows from another table in Power Query (NOT DAX)

hey,

Sure ive put it in filebin:

https://filebin.net/33dwl8b1ukm16qpu

Super User
Super User

Re: counting rows from another table in Power Query (NOT DAX)

Hi @Alisina 

 

So what is the outcome that you expect?

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Alisina Member
Member

Re: counting rows from another table in Power Query (NOT DAX)

That I can count rows from table2 using based on date value, which is the same in both table1 and table2.

I wanna count the rows in table2 Litra (how many of same kinds), the result is shown in table1.

Though they have no relation like in DAX (I dont want it done in DAX).

Super User
Super User

Re: counting rows from another table in Power Query (NOT DAX)

Hi @Alisina 

 

Ok, just follow the steps below.

1.  While in Table1, go to Home ribbon and click on Merge Queries.
2. Select Table2 and dates on both tables as below, this will add an extra column with Tables in it.

image.png

3. Click on double arrow in your new column and follow the setup below.
image.png
 
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,769)