Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sarath5140
Helper I
Helper I

Trend analysis

Hi, Can someone help me in solving my problem.

 

I have two tables and both are not related to each other

 

Table A Data:

 

ID                   DateTime                Title

17/20/2019 6:06 AmA
27/20/2018 4:04 AMB
31/20/2019 4:04 AMC

 

 

Table B Data:

 

ID                   DateTime                Title

49/20/2019 6:06 AmA1
59/20/2018 4:04 AMB1
610/20/2019 4:04 AMC1

 

Now based on these two tables data, I wanted to show the trend based on the datetime column and how many count(ID) were created from both the tables in a single Line chart. 

 

Please give me the formulas and measures to fix this

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @sarath5140 ,

 

Create a table with unique values of DateTime from table A and Table B. Use this new table to make the relationship between both tables then add this to the x-axis and the count ID from table A and Table B on your chart.

 

Check PBIX file attach.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @sarath5140 ,

 

Create a table with unique values of DateTime from table A and Table B. Use this new table to make the relationship between both tables then add this to the x-axis and the count ID from table A and Table B on your chart.

 

Check PBIX file attach.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi, Thanks for your reply.

 

I have tried the below query for getting the distinct dates from two tables, but when converting the column datatype to datetime somehow the dates are not matching.

 

For example, my table A  datetime column one value looks like this 2/26/2019 10:10:41 AM 

 

after transforming the datatype to datetime using the below formula

{

Table.TransformColumnTypes(#"Renamed Columns",{{"CreateDate", type datetime}})

 

now my datetime in the merged table looks like this

2/26/2019 3:40:41 PM 

 

I think it is taking the GMT time after conversion and because of this all the datetime values are not matching and in axis of trend not showing any dates. Could you please help in getting the exact datetime match in my trend

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors