Forum Discussion

DeltaMetal's avatar
DeltaMetal
New Member
4 years ago

If a Condition is met then Custom Column is not generated

Hi

 

I am trying to create multiple custom column based on Text Split. How do I place a condition that says that if the number is higher than max value of another column in this caase Comma Numbers then just dont create the column?

 

 

Also Can I create these colyumns in amore efficient way (single/ lesser Added custom rows?)

4 Replies

  • Ehren's avatar
    Ehren
    Icon for Microsoft Employee rankMicrosoft Employee

    Yes, you can do this by using an if expression to return previousStepName instead of Table.AddColumn(previousStepName, ...) when a condition is met.

     

    Can you describe the high-level goal you're trying to accomplish with all these splits and conditionals?

    • DeltaMetal's avatar
      DeltaMetal
      New Member

      Hi

      We have a column with string of data separated by commas. There in no maximum limit on this string and we will need to reconcile this data biweekly. In process of creating the reconciliation file we need the same 4 repeating set of data in the string. The process as shown in the image.

      We were hoping if there is any way to make it dynamic so as to stop the creation of extra columns when data is not present?

      Also, if there is a more efficient way for this that you can point to it will be greatly appreciated.

       

      P.S. – We are using Microsoft 365 and we are not seeing TEXTSPLIT as formula option.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, DeltaMetal ;

    Do you have simple examples and would like to output results to make it easier to understand your logic?

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, DeltaMetal ;

    Is your problem solved?  If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.