cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
unnijoy
Post Partisan
Post Partisan

DAX formula help

I have 3 column in my data. Two of them are date column. Learning Date Completed and Course date Completed.

Now i need to create a line graph in which x axix sould be month from January-2019 and it should go on.  And one line should show the count of month for Learning Date Completed and the other for Course date Completed. Below is the data set. 

COUNTRYRegionLearning DATE_COMPLETEDCourse DATE_COMPLETED
CanadaNorth America  
CanadaNorth America March-2019
CanadaNorth AmericaFebruary-2019January-2019
CanadaNorth America February-2019
BulgariaEuropeMarch-2019March-2019
BulgariaEurope March-2019
PhilippinesPhilippinesMarch-2019March-2019
PhilippinesPhilippinesMarch-2019March-2019
PhilippinesPhilippinesMarch-2019March-2019
BulgariaEurope March-2019
BulgariaEurope February-2019
BulgariaEurope  
BulgariaEurope February-2019
BulgariaEurope  
BulgariaEurope February-2019
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope April-2019
BulgariaEurope  
UKEurope  
UKEurope January-2019
UKEurope  
UKEurope February-2019
BulgariaEurope  
CanadaNorth America  
CanadaNorth America  
UKEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
PhilippinesPhilippinesMarch-2019March-2019
PhilippinesPhilippinesMarch-2019March-2019
CanadaNorth AmericaFebruary-2019January-2019
CanadaNorth America March-2019
UKEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
BulgariaEurope  
PhilippinesPhilippinesMarch-2019March-2019
UKEurope  
UKEurope  
BulgariaEurope  
BulgariaEuropeMarch-2019March-2019
BulgariaEurope  

 I have 2 filter on top which are Country and Region.  Please help

 

2 REPLIES 2
gooranga1
Power Participant
Power Participant

If you have 2 dates yo will need to unpivot them to join them to 1 date dimension.

 

If you go to edit queries and select the 2 date columsn and select unpivot. You can then join the 1 value column to date dimension and use the attribute column as the legend.

 

Data1.PNGData2.PNGData3.PNG

jthomson
Solution Sage
Solution Sage

You need to create a date table that you use for your x-axis, then make two relationships to your data table for each date field

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors