Power Bi - Cannot find column in a DAX - powerbi

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

Related

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

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?

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.

Power Bi add a custom row to a matrix for comparison

I have a matrix in power bi. I want to add a row at the end with a constant value so that i can make comparisons with the other values. In excel we can just manually type out the last rows but how to achieve the same in PowerBi? In a line chart, i added a constant line from the analytics tab. Is it possible to do something similar for a matrix?
Is it possible to achieve this in Power Bi?
No, there is no such option. You can create a query using 'Enter data' just with the additional row and append it to the main table

Create Multiple Calculated columns using one DAX formula

Is it possible to create 2 different columns using one DAX Expression?
I have 2 column, for example Work Done this month and Invoiced Amount. I want to create 2 columns using these.
Work Done - Invoiced and return only positive values (Deferred)
Invoiced - Work Done and return only positive values (Extra)
Note: I know how to add these columns using 2 DAX formula's here, but I would like to know if its possible with one formula.
Samsple Screenshot below:
I believe it is possible but not within the existing table and it strongly depends on the context on which your are calculating. When your calculation is performed on a row level, ADDCOLUMNS could help you out. It allows you to create a new table and add multiple calculated columns.
https://learn.microsoft.com/en-us/dax/addcolumns-function-dax