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
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
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.