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
SantoshKumar
Employee
Employee

How to create a relationship between two mutually exclusive tables to show count as per month wise

Hi,

I have Two tables which have same structure but does not contains same data at all.
i am trying to show the count of items as per Month, quater and year wise.

i used scorecard with the use of Measures for calculating count .
when i select any month or year, data reflecting only from one table. i undertood that its the issue due to relationship between the two table but i have tried all relationship available but none of them gave the expected result.
Could anyone help me to solve this issue.

 

Thanks

Santosh Kumar P

1 ACCEPTED SOLUTION
SantoshKumar
Employee
Employee

Hi,

I have got the answer for my Question.

Creating a Unique calculated column in both the tables and creating a relationship will provide the expected solution.

here is the link from Microsoft Power Bi Community tutorial which has the solution:  https://youtu.be/GarBXef0Vew 

 

Thanks

Santosh Kumar P

View solution in original post

6 REPLIES 6
SantoshKumar
Employee
Employee

Hi,

I have got the answer for my Question.

Creating a Unique calculated column in both the tables and creating a relationship will provide the expected solution.

here is the link from Microsoft Power Bi Community tutorial which has the solution:  https://youtu.be/GarBXef0Vew 

 

Thanks

Santosh Kumar P

SantoshKumar
Employee
Employee

This is the Sample data for reference.

Table1   
IDItemCreatedDateTags
1189615679/12/18 12:14 AMaa,bb,cc
2189611699/11/18 11:46 PMaa,bb,cc
3189604829/11/18 11:01 PMaa
4189594389/11/18 9:54 PMbb
5189593359/11/18 9:48 PMcc
    
    
Table2   
IDItemCreatedDateTags
6189580229/11/18 4:47 PMbb,cc
7189577269/11/18 6:08 AMaa,cc
8189542409/11/18 5:28 AMbb
9189539169/11/18 5:25 AMcc
10189538839/11/18 5:23 AMaa
amitchandak
Super User
Super User

It is not possible to join both tables with the common date and Item dimension and take results out?

A calendar can be created in power BI.

@amitchandakdata is huge and joining them is not a good option i think.

below is the sample data posting for understanding. can you give me any reference of creating a calender , i will try to see whether it will work.

Table1   
IDItemCreatedDateTags
1189615679/12/18 12:14 AMaa,bb,cc
2189611699/11/18 11:46 PMaa,bb,cc
3189604829/11/18 11:01 PMaa
4189594389/11/18 9:54 PMbb
5189593359/11/18 9:48 PMcc
    
    
Table2   
IDItemCreatedDateTags
6189580229/11/18 4:47 PMbb,cc
7189577269/11/18 6:08 AMaa,cc
8189542409/11/18 5:28 AMbb
9189539169/11/18 5:25 AMcc
10189538839/11/18 5:23 AMaa

Dates = Calendar( Date(2015, 1, 1), Date(2020,12,31))

You can calculate Year, Month, etc as per need.

For item See if the union, List.Union can work for you

@amitchandaki have created calender table and tried to apply all kinds of relationships which are available but data reflection as per selection is not happening. Do i am missing some changes ??
any suggestions could be of great help ..

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.