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
krishak77
Helper I
Helper I

Need Dax formula to get 90 Fill Rate

Hello Team,

 

I need DAX formula to get as below excel calculation

 

On D2 cell given as =C2

On D3 cell given as =D2+C3 and it should continue till last row

On E2 cell given as =IF(AND(D2<0.9,D3>=0.9),A2+(A3-A2)*(0.9-D2)/(D3-D2),0) and it should continue till last row.

 

 

Row LabelsCount of SotatCount of Sotat2 Fill Rate 90
0896573.96%73.96%0
110358.54%82.49%0
28607.09%89.59%2.076497696
36515.37%94.96%0
41291.06%96.02%0
5770.64%96.66%0
6620.51%97.17%0
71150.95%98.12%0
8400.33%98.45%0
9340.28%98.73%0
10460.38%99.11%0
11110.09%99.20%0
12140.12%99.32%0
13220.18%99.50%0
14230.19%99.69%0
15110.09%99.78%0
2030.02%99.80%0
21130.11%99.91%0
2940.03%99.94%0
3010.01%99.95%0
3310.01%99.96%0
4130.02%99.98%0
5220.02%100.00%0
     
     
     
     
     
     
     
     
     
     
     

 

Thank you in advance

 

Regards,

AK

1 ACCEPTED SOLUTION
nirali_arora
Resolver II
Resolver II

Create a calculated column for column 😧

ColumnD = VAR CurrentRow = YourTable[Index] // Replace 'YourTable' with the actual name of your table and 'Index' with your table's index column

RETURN

IF( CurrentRow = 2, // For D2 (second row), take the value from column C YourTable[C], YourTable[ColumnD] + YourTable[C] // For other rows, add the value in column C to the previous row's value in column D

)

 

Create a calculated column for column E:

ColumnE = VAR CurrentRow = YourTable[Index] // Replace 'YourTable' with the actual name of your table and 'Index' with your table's index column

VAR PreviousRowValueD = CALCULATE(MAX(YourTable[ColumnD]), FILTER(YourTable, YourTable[Index] = CurrentRow - 1))

RETURN

IF( CurrentRow > 2 && YourTable[ColumnD] < 0.9 && PreviousRowValueD >= 0.9, YourTable[A] + (YourTable[A] - EARLIER(YourTable[A])) * (0.9 - EARLIER(YourTable[ColumnD])) / (YourTable[ColumnD] - EARLIER(YourTable[ColumnD])), 0

)

 

Replace 'YourTable' with the name of your table, and 'Index' with your table's index column if you have one.

View solution in original post

5 REPLIES 5
krishak77
Helper I
Helper I

Hello Nirali,

 

Sorry for coming back.

 

could you please help to apply below formula in Measure?

 

As the table which I created it's not showing edit query, I have managed to apply first formula in Measure.

 

Create a calculated column for column E:

 

ColumnE = VAR CurrentRow = YourTable[Index] // Replace 'YourTable' with the actual name of your table and 'Index' with your table's index column

 

VAR PreviousRowValueD = CALCULATE(MAX(YourTable[ColumnD]), FILTER(YourTable, YourTable[Index] = CurrentRow - 1))

 

RETURN

 

IF( CurrentRow > 2 && YourTable[ColumnD] < 0.9 && PreviousRowValueD >= 0.9, YourTable[A] + (YourTable[A] - EARLIER(YourTable[A])) * (0.9 - EARLIER(YourTable[ColumnD])) / (YourTable[ColumnD] - EARLIER(YourTable[ColumnD])), 0

 

)

nirali_arora
Resolver II
Resolver II

Hey @krishak77 

Want to inform you that you have marked your message as a solution. 

No appreciation for my solution 🙄

Heay Nirali,

 

Really Appreciate your support and its woking as expected.

 

Thanks a lot

nirali_arora
Resolver II
Resolver II

Create a calculated column for column 😧

ColumnD = VAR CurrentRow = YourTable[Index] // Replace 'YourTable' with the actual name of your table and 'Index' with your table's index column

RETURN

IF( CurrentRow = 2, // For D2 (second row), take the value from column C YourTable[C], YourTable[ColumnD] + YourTable[C] // For other rows, add the value in column C to the previous row's value in column D

)

 

Create a calculated column for column E:

ColumnE = VAR CurrentRow = YourTable[Index] // Replace 'YourTable' with the actual name of your table and 'Index' with your table's index column

VAR PreviousRowValueD = CALCULATE(MAX(YourTable[ColumnD]), FILTER(YourTable, YourTable[Index] = CurrentRow - 1))

RETURN

IF( CurrentRow > 2 && YourTable[ColumnD] < 0.9 && PreviousRowValueD >= 0.9, YourTable[A] + (YourTable[A] - EARLIER(YourTable[A])) * (0.9 - EARLIER(YourTable[ColumnD])) / (YourTable[ColumnD] - EARLIER(YourTable[ColumnD])), 0

)

 

Replace 'YourTable' with the name of your table, and 'Index' with your table's index column if you have one.

Hello Nirali,

 

Thanks a lot for the solution

Helpful resources

Announcements
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.

Top Kudoed Authors