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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
blazer12219
Frequent Visitor

Count of number of days in month

Have field called [Off Contract Date] the value is 04/28/22

 

I need a formula to count number of days elapsed in that particular month so answer should be 28 in the example above but this field is variable and will change, field called [PartialBillingDays]

 

Next would like to create a field called [PartialBilling%]  formulated by dividing (28) or [PartialBillingDays] / the number of days in the month represented in [Off Contract Date] or Date.DaysinMonth([Off Contract Date]) 

 

So in this example the math would be 28 / 30 = .9333%

 

I can get the PartialBilling% to work but just cannot find the correct formula to cover the PartialBillingDays amount.

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Use following formula for PartialBillingDays

 

= Date.Day([Off Contract Date])

View solution in original post

4 REPLIES 4
blazer12219
Frequent Visitor

I figured out the error I included a % in name description

blazer12219
Frequent Visitor

I get an error message with that formula

 

if checked to make sure the field was set to a date type {"Off Contract Date", type date}

 

Any thoughts?

Can you click on the error and paste the message here? 

Vijay_A_Verma
Super User
Super User

Use following formula for PartialBillingDays

 

= Date.Day([Off Contract Date])

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors