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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anmolgan
Post Prodigy
Post Prodigy

How can I use a calculated column in place of a current measure?

I am trying to use the below dax that are provided in an answer, but I want to use them inside a column so that I can see results on a particular rows, and not sum that up, below are my DAX, how can I use these inside the calculated columns?

 

Running Total = CALCULATE(SUM('Table'[HA]), FILTER('Table', 'Table'[Index] <= EARLIER('Table'[Index])))

Result = 
VAR Index = CALCULATE(MAX('Table'[Index]), FILTER('Table', 'Table'[Running Total] = MIN('Table'[Running Total]) && 'Table'[Running Total] >= 'Table'[PA])) + 1
RETURN
CALCULATE(SUM('Table'[HA]), FILTER('Table', 'Table'[Index] <= Index))


Below is the link where I wanted to implement this: https://community.powerbi.com/t5/Desktop/DAX-query-to-add-numbers-until-a-condition-is-met/m-p/69547...

 

 

Any help will be appreciated. 

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anmolgan 

If i test with the following data, what final result do you want?

Could you show expected results straightforwardly?

HA PA
1.58 3.24
3.24 3.24
3.23 3.24
3.25 3.24

 

Best Regards
Maggie

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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