The Feature Everyone Loved: Inside the Credit Hold Alert

Image
  The third article in my Finance Agent series In the first two articles, I wrote about building my first finance agent and then splitting one overloaded agent into three focused ones. In this article, I will cover the feature that got the biggest reaction for users. It was not a chat experience. It was a card in Teams. When a sales order went on credit hold in Dynamics 365 Finance. A few moments later, the credit team had a concise summary, a recommendation, and links to investigate. It looked simple . That simplicity took some design to work properly. Quick Video It Starts with a Finance Event The process begins when Dynamics 365 Finance raises the configured credit-hold event. Unfortunately there is not an exposed business event for a sales order being placed on credit hold, so I had to look for another approach. Fortunately, virtual entities provided a good option. The virtual table - Credit Management (mserp_creditmantablebientity) adds a row when a new credit hold is placed. ...

Column from Examples - Power BI

In the April 2017 release of Power BI, Microsoft introduced a great new function.  Have you every been working with your data, and you know exactly what you want a calculated column to look like, but your are not exactly sure of the syntax for the formula?  Maybe you want to concatenate a couple columns, or you want to trim a column or even add some text to a column, well Column by Examples makes this very easy to do.

You can access this function in the Query Editor on the Add Column tab.


In my sample data there are three columns (birthCountry, birthState and birthCity).  I would like to simply have a new column for Birth Place.  In order to do this, I could add a custom column and write the M formula to define this column.  However I am not sure what the exact syntax should be, so I can simply choose Column From Examples - From All Columns.

This creates a new column in the preview mode.  I can then simply type the result I am looking for in the first row.  "Denver, CO USA" - Power BI interprets that I am trying to concatenate the three columns with a comma between City and State and when I tab off the field it quickly shows me a preview of the remaining rows.  If I simply click OK, the column is added as an additional step in the Query Editor.  

In this example, Power BI created the following formula - 

= Table.AddColumn(#"Merged Columns", "Combined", each Text.Combine({[birthCity], ", ", [birthState], " ", [birthCountry]}), type text)


Column From Examples also works with dates.  In my example there are three columns for the birth date.  (birthYear, birthMonth & birthDay).  Again I can simply select Column From Examples - From All Columns.  In the newly created columns I will type in 12/27/1981 and when I tab off, Power BI will create the BirthDate column for me using the following formula:

= Table.AddColumn(#"Column From Examples", "Combined (2)", each 

Text.Combine({Text.From([birthMonth]), "/", Text.From([birthDay]), "/", Text.From([birthYear])}), type text)



These are just a couple simple examples, and it is my understanding that Column From Examples does not work for everything, but so far I have had a lot of success using it and it is certainly faster than typing in the formulas myself.

For more information on this formula take a look at the Power BI documentation.

Comments

Popular posts from this blog

Showing the last 12 months based on a date slicer

A look at Dynamics 365 ERP and ERP Analytics MCP Servers

Adding a new entity to Dual-write in Dynamics 365 Finance