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

lookup value with condition from other sheet

Dear friends

how can i count a number of work individual by day in table 2

 

Table1

date           name             work
01-01-20jimdrive
01-01-20jimcut
01-01-20jimeat
02-01-20markcut
02-01-20markdrive
01-01-20roncut
01-01-20ronjump

 

Table2

date           name             workdrivecuteatjump
01-01-20jim     
02-01-20mark     
01-01-20ron     

 

thank you

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous  

In addition to 's reply. I build a table like yours to have a test.

1.png

Firstly duplicate the table.

Then we use group by to count quantities to each name.

5.png

Merge this table and the new table.

6.png

Add an conditional column in this table.

7.png

Then we select work column and use pivot.

8.png

Result:

9.png

You can download the pbix file from this link: lookup value with condition from other sheet

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

@v-rzhou-msft thank you so much for your advice, i have find another solution that less treat to do but i will kept your solution as second chance so very grateful for your help : )

v-rzhou-msft
Community Support
Community Support

Hi @Anonymous  

In addition to 's reply. I build a table like yours to have a test.

1.png

Firstly duplicate the table.

Then we use group by to count quantities to each name.

5.png

Merge this table and the new table.

6.png

Add an conditional column in this table.

7.png

Then we select work column and use pivot.

8.png

Result:

9.png

You can download the pbix file from this link: lookup value with condition from other sheet

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@Anonymous , Take a count(Table[work])

and put in a matrix with row date and name and work as column work and measure as count(Table[work])

 

or pivot in power query

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

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.