custom column
7 TopicsCreating custom column based on other column value
Creating new Custom Column based on other column value. In this case checking if other column is empty or not using the length of the value. In the Custom column add the code: each if Text.Length([subrule_id]) > 0 then 1 else 0 in the table colum you will see some different syntax as below: Table.AddColumn(#"Changed Type", "subrule_id_flg", each if Text.Length([subrule_id]) > 0 then 1 else 0) Hope this can help anyone who is working on the similar problem. Thanks525Views1like1CommentMultiple Columns, One Table, Multiple Vales from each column needed in new column
I have a wild request from one of my teams. They stupidly have an Excel that they populate each month that's based on Account Managers - but all those Account Managers live in different fields in the CRM - I think 7 in total. Before I go back and shout at them for being stupid and ask them to tidy their data up, I want to know if it's even possible in Power Query to combine multiple values from each of the columns, into one column? I gave it a go using a custom column e. [regional director]&" "&[managing director]&" "&[sales director] etc, but it just came back with nulls as I'm presuming as there is multiple values in each of those columns, it can't deal with it. But as ever, I know with Power Query, there will always be a way to do this. Essentially, within my new columns, I want all the Directors that are listed in each of the 7 fields/columns, to be listed, regardless of whether that are accounts with 5 Managers, 4, 3 etc. Actually, even as I type that out - I can't have a column with all of those can I? The end goal would then be to use a visual level filter to let me choose which Directors appear in the visual. Anyone else come across a similar problem? Thanks in advance313Views0likes0CommentsDax Column - Copy Date from a defined column and IF blank... copy date from another defined column
Hi all, My first time posting and I'm new to PBI, so apologies if this is a little unorganized. Below is a snapshot of my data table. The outcome I am looking for is to show in the "Date of Activity Logged - Copy" Column the "Date of Status Change" date for this row and IF this is blank... to show the "Date of Activity Logged" date for the same row within the "Date of Activity Logged - Copy" also. Unfortunately the source of this dataset splits these two dates into different cells, when the preferred outcome is that only the most recent date of the two is shown in a column... if that is a different way to view the issue? Any help on this is appreciated. Many thanks MattSolved943Views0likes1CommentComparison of column value to average of column total
Hello Community, Excuse the fact that I might be posting this with a possible solution floating around the community, I've tried to use different solutions found around the community but none seem to fully cover the requirement I have, either that or I may not be approaching this issue correctly. In any case, I have a table that represents every project that is ongoing or completed, alongside that is a column that represents the number of active days per project (in the project's lifecycle is a total number of active days for that project as well as a number of days where the project was idle/on-hold). From this column I'd like to calculate the total average based on selected values filtered by slicers and compare whether the project's number of active days is greater or less than the generated average. Below is an example of what I'm trying to achieve, the representation might be lackluster but: Input: Output would be: If filtered for market 'A' In this case since the selected filter is for Market 'A' the avg is computed based on the values extracted for this filter and generates each project's status based on the comparison between that average and the project's # of Active Days, I would like to be able to implement this either based on a Market slicer selection or Customer slicer selection. I've pretty much managed to nail the logic for the status and comparison and at one point event the average but strictly on a market basis but can't seem to find the right way to compute the average to adjust based on selected market or customer slicer. Any help or suggested solutions are greatly appreciated. Best, SamSolved2.5KViews0likes2CommentsiF ELSE statment with a calculation for a custom colum
Hello Im trying to figure out how to get a colum to if else. I have a colum for completetion date of course and one with the number of years until retraining and I am trying to calculate the expiry date based on If completion date = null then "course has not started" else Date.AddYears([Completion Date],[Sheet1.Retraining]) I can currently just add the retraining colum to the completetion date and this gives me a result of the rows that have a completion date. But then I have error for all the ones that have Null instead. Anyone have any suggestions to achieve this.Solved694Views0likes2CommentsAverage amount of days open tickets have been open for - on given date
Good afternoon, I am trying to solve a problem I hope the community can help with. We are using Zendesk for customer serives tickets and I have been asked to create table showing, on day, how many tickets were open, solved est. These have been done but I have been asked to do the following and can not work out the best way of doing it. For the day/period in query, the tickets that are NOT solved in that period, the total number of days of all those tickets between the ticket creation time and the ticket solved time with the result divided by the number of tickets NOT solved in that period. So in short, the avergae time all of the open ticket were open for on a given day. I have a custom table with a list of the dates and have added the ones that were open and solved on the day. Below left, how my tickets table looks. Below Right, what i want to report back. Example: On the 03/08 there were 5 tickets open, two were open for two days and three were open for just one. So thats 7 days and 5 ticket with the average of 1.4 days open. Ticket Metrics Ticket ID Created At Solved At 122 02/08/2020 04/08/2020 123 02/08/2020 04/08/2020 124 03/08/2020 04/08/2020 125 03/08/2020 04/08/2020 126 03/08/2020 04/08/2020 127 04/08/2020 128 04/08/2020 129 04/08/2020 Table - On Day Date Avergae Open Time 02/08/2020 1 03/08/2020 1.4 04/08/2020 1 Can anyone help me with a custom to do this please? Or if you have done something simlar in the past, offer a surgestion? ThanksSolved7.5KViews0likes14CommentsConditional replace and custom column.
Hello good people, I need to create DAX formula to replace sentences with random information into specific words. For example, it will look for words like dehy, hypo, impair from sentences in the strings in a specific column and replace the whole sentence as "injury" into a cutom column. I know that it can be done from custom column option. But I am not sure about the DAX code to do this.825Views0likes1Comment