Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lennox25
Helper V
Helper V

Move specific rows from one column to another column

Hi , 

 

I have a column 'Subject' that contains the title of the email received. I need to filter out and move to another column. Any 'Accepted', 'Tentative', 'Automatic reply'. What would be remaining would be considered non junk emails which I want to focus on. 

Can anyone help? TIA

1 ACCEPTED SOLUTION

@lennox25 so you can add this calculated column:

 

Column = 
IF(
    SWITCH(
        TRUE,
        CONTAINSSTRING(CMailbox[Subject], "Accepted"), TRUE(),
        CONTAINSSTRING(CMailbox[Subject], "TentatiVe"), TRUE(),
        CONTAINSSTRING(CMailbox[Subject], "Automatic reply"), TRUE(),
        FALSE()
    ),
    CMailbox[Subject]
)

 

SpartaBI_0-1655976548502.png

 




2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

View solution in original post

14 REPLIES 14
SpartaBI
Community Champion
Community Champion

@lennox25 you want to create a calculated column that will give the same result of the subjuct in case the condition is met and will be blank otherwisw?
What are the names of your table and columns so I could write to you the exact function.

To add - I do need to know how many accepted, tentative etc there are so will need a column with those in 🙂

@lennox25 what is the name of the column that has these values?
'Accepted', 'Tentative', 'Automatic reply'

@lennox25 so you can add this calculated column:

 

Column = 
IF(
    SWITCH(
        TRUE,
        CONTAINSSTRING(CMailbox[Subject], "Accepted"), TRUE(),
        CONTAINSSTRING(CMailbox[Subject], "TentatiVe"), TRUE(),
        CONTAINSSTRING(CMailbox[Subject], "Automatic reply"), TRUE(),
        FALSE()
    ),
    CMailbox[Subject]
)

 

SpartaBI_0-1655976548502.png

 




2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Hi -Thank you - That has worked perfectly! Is there a way to remove these Accepted etc from the Subject Column?

 

@lennox25 wdym? can you give me an example of the outpot?
P.S. please don't forget to accept the previous message as a solution and will appreciate your Kudos on my messages 😀😉

Hi - Thank you - I will accept as solution  - so the snippet I posted earlier. What I need  is to be able to filter out the 'junk' emails but also report on them. Essentially when all of these 'acceptance, decline, tentative etc. are taken off then only the emails that do not come under these subjects will be left. The calculated column you created for me filters all these out but I also need to have them under headings so my report should have columns: Subject, Acceptance, Decline, Tentative, Auto acceptance (all the junk that has been filtered out to another column)

@lennox25 I will PM you know

@lennox25 I pm you 50 minutes ago 🙂 Got your Kudos, so maybe you didn't see my message.

@lennox25 hey, adding a link to download the file. Let me know if that is what you meant or you need somethig else.
Move specific rows from one column to another column.pbix


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Hi - Thank you! My table is called CMailbox.  My column that I want to seperate is called Subject

@lennox25 what is the name of the column that has these values?
'Accepted', 'Tentative', 'Automatic reply'

Capture.PNG

Hi - they all come under 'subject' so I have - accepted, automatic reply, tentatives and then all other emails to action - ie. RE - Map of UK, RE: Away day September. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors