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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
PrathameshM
Regular Visitor

Need to calculate dax in which Total sum of Month should be constant for all the days.

I need to create a measure to calculate all month's data. 

E.g. Need to create logic based on the measure column 

 

MonthDaysSalesMeasure
Jan11040
Jan22040
Jan31040
Feb11060
Feb22060
Feb33060

 

2 ACCEPTED SOLUTIONS
mark_endicott
Super User
Super User

@PrathameshM - You can use the DAX Measure below:

 

VAR selected_month =
    SELECTEDVALUE ( 'Table'[Month] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Month] = selected_month )
    )

 

If this works, please mark it as the solution.

View solution in original post

Anonymous
Not applicable

Hi @PrathameshM ,

 

Your solution is great, @mark_endicott . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.

 

So easy!

 

Please try:

Measure = CALCULATE(
     SUM('Table'[Sales]),
     ALLEXCEPT('Table','Table'[Month])
)

 

The page effect is as shown below:

vhuijieymsft_0-1716519998070.png

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

3 REPLIES 3
PrathameshM
Regular Visitor

What if we want to calculate the YTD based on the financial year?

 

 

Anonymous
Not applicable

Hi @PrathameshM ,

 

Your solution is great, @mark_endicott . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.

 

So easy!

 

Please try:

Measure = CALCULATE(
     SUM('Table'[Sales]),
     ALLEXCEPT('Table','Table'[Month])
)

 

The page effect is as shown below:

vhuijieymsft_0-1716519998070.png

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

mark_endicott
Super User
Super User

@PrathameshM - You can use the DAX Measure below:

 

VAR selected_month =
    SELECTEDVALUE ( 'Table'[Month] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Month] = selected_month )
    )

 

If this works, please mark it as the solution.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.