Is there a way to do a recursive calculated column in Power BI? - powerbi

I have a situation where I want to do a "recursive" calculated column from the values of another column.
Example, Is there a way can I get this "Y" column from "X" column values using DAX in PowerBI?
Because I wanna do some similar to this
https://www.youtube.com/watch?v=ojnpFz-Mr8Y&t=2s
but I need a similar "sub_doc" column generated with DAX functions, in this example "Y" column.
I tried many combinations of DAX and nothing :(
Can anyone help me?

Related

Merge Two Measures Into A Single Column using Dax

Hi,
I have two different score for list of products i want to merge them in a single column using Dax as they are in measure. I guess concatenate will not work as they are measures, will switch statement will work?
Any ideas or suggestions?
COALESCE([Measure1], [Measure2])

Power Bi - Cannot find column in a DAX

I am a newbie in PowerBi and I am trying to create a DAX in order to compare a column with different variables in order to attribute some values in order to do some conditional formatting of the cells.
I read that I must had a MIN(), MAX(), ... in the expression but I just want to compare for each value not with the maximum.
Thanks in advance for your help and your time

DAX How to Get a Row Number Value

I have a table visualization in Power BI.
I am trying to get a row number added for my table.
I am using the following DAX: RANKX(table_1,table_1[customerSK],,ASC,DENSE)
I am getting the following error message:
A single value for column CustomerSK in table_1 cannot be determined.
This happens when a measure formula refers to a column that contains
many values without specifying an aggregation such as min, max,
count...
Does anyone have any suggestions?
Use the DAX formula in a calculated column instead of in a measure.

Sum of previous rows of the same column in PowerBI

I'm struggling to find a way to create a column in Powerbi that is calculated with the previous row of same column. I've seen similar questions in this forum (namely, How to perform sum of previous cells of same column in PowerBI and DAX - formula referencing itself) and I tried to adapt the indicated solutions to my case but without sucess.
Is it possible to create a calculated column with DAX that replicates what i'm doing in excel? or is it one of those cases that is not possible to create a closed-form formula?
excel example
Many thanks,
Paul

Calculate % of two columns Power BI

I want to calculate % of two columns which are already in %.
I want to calculate formula like
Target achieved= ACTUAL/TARGET
But here is ACTUAL is already a measure/calculated metrics so I'm not able to divide these two columns.
Any help would be appreciated..
Make sure both target and actual are actually numbers and not strings. You can do it in transform data (aka Power Query) part, before data is loaded into the report.
After that you should be able to create the measure you want, e.g. something like that:
UPDATE : What happens if Actual is not a column, but a measure?
If Actual measure is based on the columns in the same table as target you shouldn't have a problem. You cannot combine measure and column in the same formula. Measure is an aggregated field and needs to be grouped by another field (if you are familiar with SQL,think of SUM and GROUP BY). Coming back to your problem, you need to create measure out of "Target" column as well (notice I have in the formula SUM('Table'[Plan]) which makes it a measure). Than you can use both of them in the formula, but of course you need to "group" them by something(e.g. date) otherwise it will just show you a total.