Recursive logic in DAX

0 votes

I am trying to create a calculated column that depends on the results from a previous row, and I'm running into a circular dependency issue.

Sep 28 in Power BI by anonymous
• 3,400 points
42 views

1 answer to this question.

0 votes

Hey, 

The only option is to break down your queries so that there is no circular dependency.

This should return the result you are after:

TempValue = [value] + 
  CALCULATE(sum([value]), 
    filter(all('Table'), 
    [index] < earlier([index])))

TestResult = if([TempValue] > 10000, [Value],0)

TestValue = [TempValue] + 
  CALCULATE(sum([TestResult]), 
    filter(all('Table'), 
    [Index] < earlier([Index]))) 
answered Sep 28 by Gitika
• 42,520 points

Related Questions In Power BI

0 votes
1 answer

Dax query in power bi

Here is my table before I have ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,420 points
231 views
0 votes
1 answer

list reports with calculated percentage in Power BI using dax

Create a Measure called Total Revenue: Total Revenue = SUMX( ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,420 points
361 views
0 votes
1 answer

Count occurrences in DAX

You can use DAX functions to do ...READ MORE

answered Mar 9, 2019 in Power BI by avantika
• 1,500 points
10,978 views
0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 32,490 points
9,344 views
0 votes
1 answer

Using Treemap as a filter

What you want is possible using the ...READ MORE

answered Dec 17, 2018 in Power BI by Shubham
• 13,450 points
1,526 views
0 votes
1 answer

To calculate conditional running total in power query

Try Table Buffer after adding the index, or ...READ MORE

answered Apr 26, 2019 in Power BI by Shubham
• 13,450 points
955 views
0 votes
1 answer

Left Outer Join using DAX in PowerBI.

You can simply write a few measures ...READ MORE

answered Sep 24 in Power BI by Gitika
• 42,520 points
45 views
0 votes
1 answer

Calculate GB Using DAX in Power BI

Hi, @Vnk You can go through this regarding ...READ MORE

answered Jun 30 in Power BI by Gitika
• 42,520 points
193 views
0 votes
1 answer