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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
wcsilveira
New Member

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  @wcsilveira ,

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  @wcsilveira ,

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
Solution Sage
Solution Sage

@wcsilveira Hi!

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

 

BF

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors