Merge Two Measures Into A Single Column using Dax - powerbi

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])

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?

Want to bring over many columns from another table to a table that has a column of matching values

I have two (2) tables in Power Bi and I wish to bring over several columns from a table that has a column of matching values (there are many columns that I don't need). What is the best way to do so? I tried DAX query but it only allowed for one column to bring over using the LOOKUP function. I tried to merge the queries but didn't quite understand how to get it to work as the table expanded did not match up to the values. Some help please for performing this operation would be greatly appreciated. Thank you.
Don't do it with DAX, use Power Query to merge on the key column. This can all be achieved using the menu and options, no code required. This is the same as in Excel, so here's a walkthrough from Microsoft that goes through all the steps you might need.Once you start using Power Query you won't look back. Good Luck!

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

Merge or combine two columns in power bi

I am not sure if my title is correct one, but here is the deal:
I want to make a matrix visualization in Power Bi Desktop. I have fields: ARTICLE_ID and ARTICLE_NAME.
I would like to have both those fields in COLUMNS position in matrix data view. And I need them to be in one row, no need to drill down... because it is one and the same thing...
I need to have ARTICLE_ID and ARTICLE_NAME as two separate columns on the same level. without drilling. And also, I dont want to use concatenation or merging into some third column. is that possible? thanks
1) I started with this sample data.
2) I created a matrix and configured it as shown in the image below.
3) I clicked the forked arrows to show all levels.
4) In the Rows section of the formatting pane, I turned off "Stepped layout".
5) In the Subtotals section, I turned off "Row subtotals".
I don't know if this is exactly what you are looking for, but I think it is the closest I can come up with since you don't want to concatenate the columns together.
If they are from the same table then just drag and drop them into the columns.
The way a matrix works from my understanding in PowerBI is;
Rows are just the headings/categories of the values.
You might need to also go into the format tab, values, and make sure show on rows is on.
For example, let's say our value headings are rainy days and sunny days.
Your columns are months.
The rows will be the 2 categories.
The values will be the values.
As concatenation and "&" does not work in Power BI directquery you can use the below one:
[New_column_name] = if((table_name[column_name]="A" && table_name[column_name]="B"),"AB","NA")
Thanks,
Sachin Kashyap

power bi: calculated columns dont appear in merge/append query

why in power bi calculated columns do not appear in merging or appending two different tables? Is there any way to enable this thing?
I am facing difficulties while merging two tables in which one of the table contains calculated columns.
Calculated columns doesn't appear in query editor. Try adding column in query editor itself if possible.