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
ppatil
Helper III
Helper III

need count with respect to name in table visual

Hi Community..!!
Need quick response..!!

ppatil_0-1653592598683.png

I need to count supplier count and order count with respect to shop name. But in the above table visual all values are repeating. supplier and order is present in table1 and shop name is present in table2.
will u please help me to solve this..!!

1 ACCEPTED SOLUTION

Hi @ppatil ,

 

According to your statementm, [Supplier] and [Order] in same table, [Shop] in the second table and you relate two tables by Table1[Order] and Table2[Shop]. The relationship is one to many (1-*).

You create a table visual by Table2[Shop], Table1[Order] and Table1[Supplier]. As far as I know, if you create a relationship as you mentioned above, Power BI should show you correct result.

My Sample is as below.

Table1:

RicoZhou_0-1653964792941.png

Table2:

RicoZhou_1-1653964819296.png

Relationship:

RicoZhou_2-1653964829643.png

Result is as below.

RicoZhou_3-1653964843086.png

Please check your relationship. Or you can try to create measures to count Supplier and Order.

Count of Supplier =
CALCULATE (
    COUNT ( 'Table1'[Supplier] ),
    FILTER ( 'Table1', 'Table1'[Column Related to Table2] = MAX ( 'Table2'[Shop] ) )
)

 

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
Nathaniel_C
Super User
Super User

Hi @ppatil , will you show us a picture of the relationship between these two tables?
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Order ---> Shop
one to many (1-*)

Hi @ppatil ,

 

According to your statementm, [Supplier] and [Order] in same table, [Shop] in the second table and you relate two tables by Table1[Order] and Table2[Shop]. The relationship is one to many (1-*).

You create a table visual by Table2[Shop], Table1[Order] and Table1[Supplier]. As far as I know, if you create a relationship as you mentioned above, Power BI should show you correct result.

My Sample is as below.

Table1:

RicoZhou_0-1653964792941.png

Table2:

RicoZhou_1-1653964819296.png

Relationship:

RicoZhou_2-1653964829643.png

Result is as below.

RicoZhou_3-1653964843086.png

Please check your relationship. Or you can try to create measures to count Supplier and Order.

Count of Supplier =
CALCULATE (
    COUNT ( 'Table1'[Supplier] ),
    FILTER ( 'Table1', 'Table1'[Column Related to Table2] = MAX ( 'Table2'[Shop] ) )
)

 

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.

 

Thank U @v-rzhou-msft 

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.