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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
aakif_aslam
Helper I
Helper I

Mapping Issue with Event Table and Calendar Table

Hello to all,

 

In this case - Event table has the data where dates are not in a continous manner and Calendar table is the date range of Min/Max of Event_Date column. I'm unable to establish a working relationship with date column between Event and Calendar table.

 

aakif_aslam_1-1667290327132.png

 After mapping the calendar icon changes of Event_Date

aakif_aslam_2-1667290408081.png

SAMEPERIODLASTYEAR function does not show last year values if I used the Event_Date from the Event table, also after mapping with calendar table when the dates are selected from calendar table there is no data displayed at all. 

I'm unable to understand the issue.

 

Please HELP.

 

 

@amitchandak 

@Greg_Deckler 

@Shaurya 

@lbendlin 

@ImkeF 

 

4 REPLIES 4
menglaro78
Microsoft Employee
Microsoft Employee

Hello @aakif_aslam ,
you have two solutions.

 

SOLUTION A - WITHOUT TABLE DATE.

In Power BI, Option And Settings, in Current File|Data Load, setting ON option Time Intelligence.
In this case you can use SAMEPERIODLASTYEAR with Event Data.

timeintelligence.png

SOLUTION B - WITH TABLE DATE.

Select Table Date and in Table Tools use option "Mark as Date Table".

To do this remeber this rules: 

When you specify your own date table, Power BI Desktop performs the following validations of that column and its data, to ensure that the data:

  • contains unique values
  • contains no null values
  • contains contiguous date values (from beginning to end)

In this case, use Date from Date Table in SAMEPERIODLASTYEAR .  

DateTable.png

Documentation here: Set and use date tables in Power BI Desktop - Power BI | Microsoft Learn

 

Marco

Thanks @menglaro78 for the reply.

 

From what I understand, for Time Intelligence to work date must be continous which is not the case in Events Table. Hence Solution A won't work.

 

I tried Solution B but it didn't work.

Mapping one-to-many is visible but when I select any month from Calendar Date in slicer, shows blank fields from Events Table. 

aakif_aslam_0-1667365872679.png

 

 

Hi, is it possible to share your file?

This is not correct: Hence Solution A won't work..

In solution A , Power BI generate automatically generates a hidden calendar table with contiguous dates.

 

Marco

 

 

@menglaro78, it is a client sensitive data. I'm not allowed to share it.

 

Anyways thanks for the help, I'll need to check some workaround for this.  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.