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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Craig_NPDL
Frequent Visitor

Recreating an Existing Report with a new dataset

Hi to the community, I'm looking for guidance on why I may be experiencing issues with a new dataset. When I first started using PBI, I created all of my visuals by importing data from Excel tables which I updated periodically. These visuals have become the primary reporting for all of my sites. I was always going to recreate the reports from the origin data so that the updates could be done automatically. Having learnt how to transform data I am at a point where I will work through transitioning the reports to be automatically updated. If I can solve the issue below, it will be the key to unlocking the whole refresh project.

 

In my original data (in Excel), I add data to an Excel table (BBS_Data) in which I added a column called "SimpleCount". It checked if a data field was blank, if it wasn't, its value equaled 1, this column formed the basis of the item counts that I used for my reports. I also added in a Date Table so I could use the "Month to Date" and "Year to Date" Dax Functions. The Date Table is created using the following code MyCalendar2 =CALENDAR("1/1/2020",today()), MyCalendar2 is set up as a Date Table. It has a One to Many relationship with the BBS_Data table, linked on a Date field.

 

I have a Line Graph visual that shows the accumulated count over the month. The measure I wrote for this visual is: 

ItemCount MTD = CALCULATE(SUM((BBS_Data[SimpleCount])),DATESMTD(MyCalendar2[Date])) +0
It produces the exact visual that I am after, accumulating over the month, the line graph going up day by day.

 

In my new data (imported directly from the cloud system to a table called IMS_AnalysisBBS), I added a column called "SimpleCount" to the table, the column is populated using the following function SimpleCount =IF(IMS_AnalysisBBS[Id]<>0,1,0), it is formated and matches the same column in the Excel table. I also created a Date Table called "ModelCalendar", exactly the same as above (structure and linkage).

 

I added data to a simple tabel to ensure that there was data being return which there is. This, however, is where I have come unstuck. When I have attempted to replicate the Month to Date function, no data is returned. The table visual shows the dates but no count is returned. The Dax funtion is below.

ItemCount MTD = CALCULATE(SUM((IMS_AnalysisBBS[SimpleCount])),DATESMTD(ModelCalendar[Date])) +0
 
It seems to be an issue with the Date table/link. I have tried different combinations of Dates and the Simple count but nothing is returned, the tabel comes up as below. The data is there, hopefully someone is able to tell me what my error is and how to get it out.
Craig_NPDL_0-1717991030292.png

 

Regards

Craig

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Craig_NPDL , Hope ModelCalendar is marked as a date table, having all the dates required. You should COlumn from ModelCalendar in Visual, slicer, and measures(seem like using in measure)

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
Craig_NPDL
Frequent Visitor

Hi everyone

@Ashish_Mathur , I was unable to upload the requested information due to the business nature of it. @amitchandak thank you for the video links. 

I have solved this issue as I was watching the video guidance and thinking on how one set of data was working and one was not. The issue I had created was the format of the date. In the first set of data, from Excel, the time was removed from the Date field. When I extracted the data from the cloud system, all I needed to do was transform the Date field to Date only, link with the Calendar table on the Date field and the queries worked perfectly. Than you for the help and guidance.

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file and show the problem very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Craig_NPDL
Frequent Visitor

Good morning @amitchandak, thank you for the reply. I can confirm that ModelCalendar is set up as a Date Table, linked to the main table on a date field, the measure uses the ModelCalendar Date column, the Visual also uses the ModelCalendar date field. I will review the video to see if this indicates where the problem sits. 

 

amitchandak
Super User
Super User

@Craig_NPDL , Hope ModelCalendar is marked as a date table, having all the dates required. You should COlumn from ModelCalendar in Visual, slicer, and measures(seem like using in measure)

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.