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

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

Reply
UlisesCiccola
Helper I
Helper I

Calculate measure with fixed value

Hello everyone,

 

 

I am quite new to DAX and need to obtain a calculated measure based on the following data. The column "Total days in Month" has the sum of the column "difference" for a given month. This date table is connected to a sales table by the date column: 

 

Date               Value             Difference     Total days in Month

  

25/6/2011     21.7                  0                       25.7

26/6/2011     21.7                   0                     25.7

27/6/2011     22.7                  1                      25.7

28/6/2011     23.7                  1                     25.7

29/6/2011     24.7                  1                     25.7

30/6/2011     25.7                  1                     25.7

1/07/2011       1                    1                      25.4

2/07/2011       2                    1                     25.4

3/07/2011       2.7                0.7                   25.4

 

I need to calculate the sum of sales/fixed value for the month. For instance if I pick june I need to have the sum of sales divided by 25.7 but if I pick just one day of july the denominator will be the sum of 25.7 and 25.4

 

Thank you so much in advance!!!

3 REPLIES 3
amitchandak
Super User
Super User

@UlisesCiccola , Try a measure like

 

closingbalancemonth(Table[Date],sum(Table[Value]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@UlisesCiccola , is it value of the last date of the month, you can use closingbalancemonth

https://docs.microsoft.com/en-us/dax/closingbalancemonth-function-dax

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I am sorry, never used this DAX, how would I use it in this context considering the table given? Also the final value for the month changes each month.

 

Sorry for the question by I am quite new to Dax and need the answer for this particular problem

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors