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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Measure dynamically

Good morning guys

I need to create a dax measure for each row of a column of a table dynamically. How to do this?

 

Observation: I'm doing it like this because I need to describe the values ​​of this dimension in a line chart with the accumulated total. Without creating a measure for each row, I can't show the cumulative total

 

Thanks is advance 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1647325776682.png

If you want to calculate the cumulative total, you can use the following dax:

Create measure.

accumulated total =
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]<=MAX('Table'[date])))

Result:

vyangliumsft_1-1647325776685.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1647325776682.png

If you want to calculate the cumulative total, you can use the following dax:

Create measure.

accumulated total =
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]<=MAX('Table'[date])))

Result:

vyangliumsft_1-1647325776685.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

and what about cummulative totals for last year?

BeaBF
Super User
Super User

@Anonymous Hi!

Can you provide sample data on which to calculate the measure and the result you expect to obtain?

 

BF

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.