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
mohsenask
Helper II
Helper II

Matrix problems with calendar

I have a basic table with Booking nos., Booking Dates, Departure Dates, Arrival Dates.

 

I created two calendars; Bkng_Calendar and Arrivals_Calendar. Related them to the relevant dates in the main Table having all data called 'DATA'

I use the matrix visual to build a visualisation that shows me Arrival Dates - MoM and it works fine.

The exact same thing works fine with the Arrival Dates_Calendar connected to the Booking Date in the DATA table.

 

ARRIVAL CALENDAR related to BOOKING DATE

 

Screenshot 2021-02-24 at 16.03.39.png

 

I connect the Bkng_calendar

However, when i connect the Bkng_calendar and build a visualiation to display the same MoM for Booking dates it gives me blank dates. it doesnt show the year, month, indented level and displays the total sum of bookings rather than the individual month totals

BOOKING CALENDAR related to BOOKINGDATE

Screenshot 2021-02-24 at 15.58.58.png

 

Both calendars use the exact same code to create the calendar

 

Please help

2 ACCEPTED SOLUTIONS

@mohsenask , I forget to ask. Does the date has a timestamp? And that was the reason. I changed the format of the booking date and checked.

 

Created a new date column(Without time) and used that is joined. Working now. Please find the find attached after signature

example in case file does not open . One of the two ways, a new column

Date = [booking Date].date
or
Date = date(year([booking Date]),month([booking Date]),day([booking Date]))

 

refer my video, where I covered why TI fails: https://www.youtube.com/watch?v=OBf0rjpp5Hw

View solution in original post

@amitchandak - thanks i got the file and the solution works.

 

however i had another measure that is applied to the visual for calculating MoM bookings count. 

 

Bkngs_PrevMnth = CALCULATE(DISTINCTCOUNT('vw_SalesAnalysis_Svcs'[Bookings]),PREVIOUSMONTH(vw_SalesAnalysis_Svcs[Bk Date].[Date])) gives me the count for previous month of Nov 2020 only. No other months show the previous month data

Screenshot 2021-02-24 at 19.46.30.png
 
the below formula gives me no prev month count at all
Bkngs_PrevMnth = CALCULATE(DISTINCTCOUNT('vw_SalesAnalysis_Svcs'[Bookings]),DATEADD(vw_SalesAnalysis_Svcs[Bk Date],-1,MONTH))
 
Screenshot 2021-02-24 at 19.47.42.png

View solution in original post

7 REPLIES 7
mohsenask
Helper II
Helper II

@amitchandak Ive attached the file here for your review. Can you check and advise?https://www.dropbox.com/s/fu0sn0n2h77xzk1/BearGrylls%20KPI_test.pbix?dl=0 

@mohsenask , I forget to ask. Does the date has a timestamp? And that was the reason. I changed the format of the booking date and checked.

 

Created a new date column(Without time) and used that is joined. Working now. Please find the find attached after signature

example in case file does not open . One of the two ways, a new column

Date = [booking Date].date
or
Date = date(year([booking Date]),month([booking Date]),day([booking Date]))

 

refer my video, where I covered why TI fails: https://www.youtube.com/watch?v=OBf0rjpp5Hw

@amitchandak - thanks i got the file and the solution works.

 

however i had another measure that is applied to the visual for calculating MoM bookings count. 

 

Bkngs_PrevMnth = CALCULATE(DISTINCTCOUNT('vw_SalesAnalysis_Svcs'[Bookings]),PREVIOUSMONTH(vw_SalesAnalysis_Svcs[Bk Date].[Date])) gives me the count for previous month of Nov 2020 only. No other months show the previous month data

Screenshot 2021-02-24 at 19.46.30.png
 
the below formula gives me no prev month count at all
Bkngs_PrevMnth = CALCULATE(DISTINCTCOUNT('vw_SalesAnalysis_Svcs'[Bookings]),DATEADD(vw_SalesAnalysis_Svcs[Bk Date],-1,MONTH))
 
Screenshot 2021-02-24 at 19.47.42.png

thanks - it worked after I deleted and recreated the pageg from scratch

 

Thank you very much @amitchandak 

mohsenask
Helper II
Helper II

@amitchandak - I need two date tables because they are both different visuals on different pages in the same report

@mohsenask , This display means you are displaying the wrong date table. Or the table is missing joins(all value are the same)  and also dates are missing in date table, because values are null (less date in date table)

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.