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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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