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
harakuruku
Helper I
Helper I

Count in two related tables

So I have two related tables called units and opportunities. I have a total of 50 units and their status can be found in the opportunities. I created a conditional column for that status with three category Issued, Conditonal, Unconditional and the fourth one is Not Specified if they didn't indicate any status. The thing is, not all units can be found in opportunities table unless they were transfered to it. So my opportunities table has a total of 31 units only.  But when I display them in bar chart, PBI only counts those 31 units even though I used the units table as a value to count them. See photo:

help.PNG

 

hhh.PNG

 

Need to show the remaining units as Not Specified. THANK YOU! ♥

 

 

 

1 ACCEPTED SOLUTION

@v-yulgu-msft @Ashish_Mathur Thanks for replying. Found the solution in my problem. In the end, I decided to duplicate both tables and merge the duplicated tables. It worked! I just have to create relationship between them so that everytime the original table is updated so is the duplicate. Thank you so much! Smiley Happy

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @harakuruku,

 

I could get correct result in my test.

1.PNG

 

In your scenario, are there some repeat Unit records in units table? Please try to add measure CountUnit=Count('units'[UnitID]) into chart for a test.

 

If possible, please share your .pbix file so that I can check for you.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yulgu-msft @Ashish_Mathur Thanks for replying. Found the solution in my problem. In the end, I decided to duplicate both tables and merge the duplicated tables. It worked! I just have to create relationship between them so that everytime the original table is updated so is the duplicate. Thank you so much! Smiley Happy

Ashish_Mathur
Super User
Super User

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.