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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lukmtb08
Helper III
Helper III

DAX Calculate expression dynamic value

Dear community, 

in a lot of my calculate expressions, I have to change the value for Table[Month] three times a year in about 50 measures. 

CALCULATE(SUM(Table[Value]),Table[Month]=2) to CALCULATE(SUM(Table[Value]),Table[Month]=5) 

Therefore I trief to use a measure as filter criterium, but it did not work:
CALCULATE(SUM(Table[Value]),Table[Month]=[test measure])
test measure = 2 (formatted as whole numer)
 
 
Is there any other workaound to make the adjustment of my expressions more dynamic in the future?

Thank you in advance!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lukmtb08 ,

You can update the formula of measure as below and check if it can return the correct result...

Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( 'Table', 'Table'[Month] = [test measure] )
)

In addition, I create a sample pbix file (see the attachment), please check if that is what you want.

yingyinr_0-1676343997407.png

If the above ones can't help you, could you please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @lukmtb08 ,

You can update the formula of measure as below and check if it can return the correct result...

Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( 'Table', 'Table'[Month] = [test measure] )
)

In addition, I create a sample pbix file (see the attachment), please check if that is what you want.

yingyinr_0-1676343997407.png

If the above ones can't help you, could you please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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.