Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good afternoon all,
I have a table containing a field called 'Description', and a field called 'Amount'. I would like to create a field that displays the amount if the description field contains the substring 'dividend'. The appearance of this substring can appear anywhere in the description field. I believe I need to use 'Text.Contains' but have been unsuccessful in the syntax usage.
Any and all help is greatly appreciated.
Jim
Solved! Go to Solution.
Hi @JimB-GA
There's a very simple way to do it.
You can add a conditional column in edit query.
= Table.AddColumn(#"Promoted Headers", "Custom", each if Text.Contains([Description], "dividend") then [Amount] else [Description])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JimB-GA
There's a very simple way to do it.
You can add a conditional column in edit query.
= Table.AddColumn(#"Promoted Headers", "Custom", each if Text.Contains([Description], "dividend") then [Amount] else [Description])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks. A quick and easy solution.
Jim
HI @JimB-GA ,
calculated column:
Hi @JimB-GA
there are 2 different entities:
1. Power Query mode. it work with data source and uses M language. in this mode 'Text.Contains' should be ok
2. DAX mode. This is the mode to create visuals and add business logic to your report. If you want to use this mode you should look at SEARCH (https://docs.microsoft.com/en-us/dax/search-function-dax) or FIND (https://docs.microsoft.com/en-us/dax/find-function-dax) functions
do not hesitate to give a kudo to useful posts and mark solutions as solution
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
75 | |
64 | |
52 | |
47 |
User | Count |
---|---|
218 | |
88 | |
73 | |
64 | |
60 |