cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
siddharthkapse2 Frequent Visitor
Frequent Visitor

Multiple calculated columns in single iteration of Loop

Hello Everyone, 

Please refer to the below data table.

FlagXYAB
01002001003700
02004002003700
1300003400
04006004003400
05002005003400
1200003200
01004001003200
04001004003200
03004003003200
07003007003200
1100003100
04006004003100

 

I am trying to calculate value in column B using below logic.
 
Step 1 = Copy Data from Column X into Column A.
Step 2 = The first value in the column B should be the total of column A.
Step 3 = Check Flag,If it is 1 then replace respective value in column A with respective value in Y Column.
Step 4 = Once the value is replaced,sum of the column A should be calculated in column B.
Step 5 = If flag is 0,the value in column B should be the earlier calculated value.
 

Steps 3 , 4 & 5 above should execute in same iteration of loop or with the help of supporting columns.

 

Can anyone help me with the DAX for above logic.

 

Thanks.

 

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Multiple calculated columns in single iteration of Loop

hi @siddharthkapse2 

I'm a little confused by your description, could you please use the sample show how to get the expected output?

Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)