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.
Hi Friends,
Thanks for your help.
I am working on a table as shown in the screenshot. I want to write IF function in the table rows. So far i have written the functions like, Table.Skip, Table.FillDown, Table.PromoteHeaders etc. I am unable to figure out how to write IF function in Power Query.
Kindly help me if i have to write a funciton, if value is greater than a certain number then it should return true else false.
Regards,
Pradip
Hi @PradipMCT ,
Please see picture below. To add an if column, go to Add Column, select Condition Column, and fill in the boxes. You may add additional if statements. If you look at the function bar after you have done this, you will see the M language terminology for this.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
Hi @Nathaniel_C
Thanks a ton for responding.
I know this way to write IF Function. My question was how to write IF function in the Row Table as shown/highlighted below in the screenshot. In those Row Tables, I would like to write IF function that is applicable to all the rows not just the current table. These tables are hidden inside the row. Hope i could make it simpler to understand!
Pradip Pardeshi
Microsoft Certified Trainer
Hi @PradipMCT ,
I have heard that @ImkeF is the one to go to for M language questions!
Nathaniel
Proud to be a Super User!
Hi @Nathaniel_C
Thanks for tagging him to the post. Appreciate it.
@ImkeF Can you please help me with my query?
Pradip Pardeshi
Microsoft Certified Trainer
Not sure about your request: What shall the if-statement do? Do you want to use it in a Table.AddColumn-comand on those nested tables?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi, @ImkeF Thanks for responding. I have a column in which a word total is written. I would like to remove only the rows that contain the total row. I thought I can use the logic, i.e. if the cell contains the word "TOTAL" I will filter them out using an additional column and use IF in it. Otherwise, also I would like to know if we can write IF Function in such situation. Regards, Pradip Pardeshi
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
51 | |
19 | |
12 | |
11 |