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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
EmmaLiuLiu
Helper I
Helper I

How to Calculate Days in Different Months

I promise I did my research on the internet before I post a new thread here. lol

 

I have a table like this:

FinalXtime Start DateEnd DateXtime End DateExport DateDays Count$/day
CM1/15/2024 1/31/20243/8/20241720
 2/1/2024 2/20/20243/3/20242055
01/20/2024 2/5/20243/8/2027015
End 2/282/22/20242/28/20243/5/2024 726
End 3/52/22/20243/5/20243/8/20243/3/20241314

 

When the column Final is "CM" or blank, use column Xtime Start Date and Xtime End Date to calculate Days Count. When column Final is 0, Days Count is 0. When column Final has an "End" date, use column Xtime Start Date and End Date to calculate Days Count. I need to create a meausure to calculate the Days Count for different months. I don't even know where to start since there are different date columns for different values from column Final. When I create a bar chart based on time (year.month), I will be able to see Days Count by month. Help PLEASE!

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

2 REPLIES 2
lbendlin
Super User
Super User

lbendlin_1-1734647762557.png

 

 

Thank you so much @ibendlin. It worked!

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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