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, 2020 in Power BI by anonymous
• 8,910 points
1,987 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, 2020 by Gitika
• 65,910 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,570 points
809 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,570 points
1,366 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,520 points
25,712 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
• 33,030 points
18,363 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,490 points
4,148 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,490 points
1,955 views
0 votes
1 answer
0 votes
1 answer

Left Outer Join using DAX in PowerBI.

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

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
1,400 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, 2020 in Power BI by Gitika
• 65,910 points
4,113 views
0 votes
1 answer

Using DAX calculation how to calculate monthly budget till today in power bi Desktop?

You can make use of this: MTD Budget ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
1,570 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP