Forum Discussion

DS_Perry's avatar
DS_Perry
New Member
4 years ago
Solved

Date Table Returning zero values

Hello All,

I am pretty new to Power BI and DAX so I apologize if my vocabulary isn't entirely accurate, however I'm having trouble with the functionality of the program.

 

Goal: I would like to create a visual that returns the count of ID's based off of date using a date table 

 

Link to .pbix

Link to data

 

Summary of Problem: I create a relationship between a date table and fact table. When creating a visual using the date table field [date], and fact table count of [Id's] the relationship between the date table seems to break and return nothing.

 

Details: I created a date table and created a relationship to a 'Lead' Database table using the respective "Date" field (in the Main date table) to the "CreatedDate" (in the 'Lead' table). Shown Below

  • *Uses a 1:Many relationship with a single crossfilter moving towards the 'Lead' table

 

When I pull in a table in the visualizations, using a the dimensions of 'Main Date Filter'[Date] and count of 'Lead'[Lead Id], it seems theres no relationship between the 'Main Date Filter'[Date] and 'Lead'[CreatedDate] because none of the dates populate and counts all the ID's into a blank date

 

  • * Also I made sure to turn off filters off for this example and strip all relationships to just the lead object and date

 

Here are the further data types of each of the fields that are being related:

 

 

Thank you for taking the time to find a solution and I appreciate the help as this simple problem has been driving me crazy!
Once again the goal is to just return the count of Id's per date and I don't understand why this is not working.

 

  • Data[CreatedDate] is of the type of Date/time, which is different from type Date. A simple solution is to change it in PQ.

6 Replies

  • PijushRoy's avatar
    PijushRoy
    Community Champion

    DS_Perry 

    Please check date data type and format between two table .
    Can you please share pbix

  • NimaiAhluwalia's avatar
    NimaiAhluwalia
    Continued Contributor

    Hello DS_Perry 

     

    After seeing the tables the data type seems perfect, the problem can be in the columns only or some spaces in the columns.

     

     

  • CNENFRNL's avatar
    CNENFRNL
    Community Champion

    Data[CreatedDate] is of the type of Date/time, which is different from type Date. A simple solution is to change it in PQ.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DS_Perry ,

    Please refer to my pbix file to see if it helps you.

    First click Home>>Transform Data >>Transform Data.

    Then change the CreatedDate column type.

    Then click Add new step.

    Then close and apply.

    If I have misunderstood your meaning, please contact me and provide your desired output.

    Best Regards

    Community Support Team _ Polly

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.