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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@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)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
amitchandak
Super User
Super User

@mohsenask , check if you can work with one calendar using userelationship

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.