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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need to create a measure to calculate all month's data.
E.g. Need to create logic based on the measure column
| Month | Days | Sales | Measure |
| Jan | 1 | 10 | 40 |
| Jan | 2 | 20 | 40 |
| Jan | 3 | 10 | 40 |
| Feb | 1 | 10 | 60 |
| Feb | 2 | 20 | 60 |
| Feb | 3 | 30 | 60
|
Solved! Go to Solution.
@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.
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:
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!
What if we want to calculate the YTD based on the financial year?
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:
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!
@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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |