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
DS_Perry
New Member

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

DS_Perry_0-1645986927734.png

  • *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

 

DS_Perry_1-1645987274158.pngDS_Perry_2-1645987317026.png

  • * 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:

 

DS_Perry_4-1645987796197.png

 

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.

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
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.

CNENFRNL_0-1646003343521.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

6 REPLIES 6
v-rongtiep-msft
Community Support
Community Support

Hi @DS_Perry ,

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

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

vpollymsft_0-1646184812845.png

Then change the CreatedDate column type.

vpollymsft_1-1646184914840.png

Then click Add new step.

vpollymsft_2-1646184954257.png

vpollymsft_3-1646184990281.png

Then close and apply.

vpollymsft_4-1646185035468.png

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.

 

 

 

CNENFRNL
Community Champion
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.

CNENFRNL_0-1646003343521.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

NimaiAhluwalia
Responsive Resident
Responsive Resident

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.

 

 

How would I know if there is a problem with the columns or spacing of the data? Also I editted my question so it included the pbix file

 

Link to .pbix

Link to data

PijushRoy
Super User
Super User

@DS_Perry 

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

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.