<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Felix Yip on Medium]]></title>
        <description><![CDATA[Stories by Felix Yip on Medium]]></description>
        <link>https://medium.com/@b00782961?source=rss-a2c04e3d2977------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Xmzr078Dw-4UnjrS</url>
            <title>Stories by Felix Yip on Medium</title>
            <link>https://medium.com/@b00782961?source=rss-a2c04e3d2977------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 10:46:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@b00782961/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Filter Data in SharePoint Connector in Power Automate by OData Query Syntax]]></title>
            <link>https://medium.com/@b00782961/filter-data-in-sharepoint-connector-in-power-automate-by-odata-query-syntax-b3d084c2f076?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3d084c2f076</guid>
            <category><![CDATA[power-automate-training]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[power-automate-flow]]></category>
            <category><![CDATA[odata]]></category>
            <category><![CDATA[power-automate-developer]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Tue, 03 Jun 2025 06:12:34 GMT</pubDate>
            <atom:updated>2025-06-03T06:12:34.901Z</atom:updated>
            <content:encoded><![CDATA[<p>Filtering data in Power Automate using the SharePoint connector can be a powerful way to manage and manipulate your data. By using OData query syntax, you can efficiently filter and retrieve specific data from your SharePoint lists. In this blog post, I will explain the common OData query syntax used in Power Automate for filtering data in the SharePoint connector.</p><h3>OData Query Syntax</h3><p>OData (Open Data Protocol) is a standardized protocol for querying and updating data. In Power Automate, you can use OData query syntax to filter data in the SharePoint connector. Here are some common OData query options:</p><p><strong>✅ 1. Comparison Operators</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*DKzZIJbX7K6ablkIi23Nqg.png" /></figure><p><strong>🔁 2. Logical Operators</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*DF3MEHMmhIdTUqPrPNBLAw.png" /></figure><p><strong>🔍 3. String Functions</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*zjTEbzSMNbbJ1_oajbhXAA.png" /></figure><p><strong>📅 4. Date Functions</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*m3HI6wm6G8P3rjV1vKVxiQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3d084c2f076" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to bypass a certain action in Power Automate]]></title>
            <link>https://medium.com/@b00782961/how-to-bypass-a-certain-action-in-power-automate-cb0319e86360?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb0319e86360</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Wed, 18 Sep 2024 08:52:12 GMT</pubDate>
            <atom:updated>2024-09-18T08:52:12.228Z</atom:updated>
            <content:encoded><![CDATA[<p>In Power Automate, normally when a certain action fails, the whole workflow will fail ensuite as well.</p><p>In the situation where you want to make sure the flow work while adding an optional action which does not matter to the workflow that much, what should you do?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*C3-Ptlz_9b8V2odwoUVJOA.png" /></figure><p>The picture above is the result you would like to get. The flow can continue even if a certain action in between fails.</p><p>How:</p><ol><li>Click the action after the optional action which you want to bypass</li><li>Click the Parameters section</li><li>Find the section run after</li><li>Click the four check boxes or several of them according to your needs</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*G-RuAfskz68cwib9rlzv8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*RfGc25rtbrzKtAehFE2_tg.png" /></figure><p>Here are four options for you to choose, you can choose to continue the flow when a previous action succeeds, expired, ignored, or failed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb0319e86360" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power BI with REST API]]></title>
            <link>https://medium.com/@b00782961/power-bi-with-rest-api-a83dc8da54e5?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/a83dc8da54e5</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[power-automate]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Mon, 16 Sep 2024 13:35:38 GMT</pubDate>
            <atom:updated>2024-09-16T13:36:27.818Z</atom:updated>
            <content:encoded><![CDATA[<p>Power BI offers a REST API that enables developers and data professionals to interact programmatically with Power BI services. But what exactly can the REST API do in Power BI, and why should you consider using it? Let’s dive in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xMcwq4Lvblo8a7oG" /><figcaption>Photo by <a href="https://unsplash.com/@firmbee?utm_source=medium&amp;utm_medium=referral">Firmbee.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is REST API in Power BI?</h3><p>The Power BI REST API provides service endpoints for embedding, administration, governance, and user resources. <a href="https://www.bing.com/aclick?ld=e8N_7PYAeE2wkP8EaVSA7kmjVUCUyxCTTKiBNtb7qleVKfoWZtpozRuhQ9HRg2KA9R1KNAFz_eMX9fywwxMTTu1u2O1azKaT1vJHmtMga1dMxSci0nlvKhCQldRe9SDK-FqKKTOYMEsFQ8z4o4x6gMVfCaGsr3vmQL7dhwRnh1Fi64ovY2&amp;u=aHR0cHMlM2ElMmYlMmZib29taS5jb20lMmZjb250ZW50JTJmZWJvb2slMmZhaS1uYXRpdmUtYXBpLW1hbmFnZW1lbnQtZ3VpZGUlMmYlM2Z1dG1fc291cmNlJTNkYmluZyUyNnV0bV9tZWRpdW0lM2RwYWlkc2VhcmNoJTI2YWRfcGxhdGZvcm1faWQlM2Q0OTQxOTIwODMtMTI1NDU0NDA3MjEzMzI1OS03ODQwOTEzMzkxOTYwMSUyNnV0bV9jYW1wYWlnbiUzZEVNRUElMjUyMC0lMjUyMEVORyUyNTIwLSUyNTIwU2VhcmNoJTI1MjAtJTI1MjBOb24tQnJhbmQlMjUyMC0lMjUyMEFQSSUyNTIwTWdtdCUyNnV0bV9rZXl3b3JkJTNkYXBpJTI1MjBzZXJ2aWNlJTI2X2J0JTNkNzg0MDkxMzM5MTk2MDElMjZfYmslM2RhcGklMjUyMHNlcnZpY2UlMjZfYm0lM2RwJTI2X2JuJTNkbyUyNl9iZyUzZDEyNTQ1NDQwNzIxMzMyNTklMjZtc2Nsa2lkJTNkMjlmNjI3Yjk5MzdlMTcyYWJiNjI0MTUxYTJhZDE0ZTY&amp;rlid=29f627b9937e172abb624151a2ad14e6">It allows you to perform a variety of operations, such as managing Power BI content, performing administrative tasks, and embedding Power BI content into other applications</a>.</p><h3>Key Capabilities of Power BI REST API</h3><ol><li>Content Management:</li></ol><ul><li><strong>Dataset Management</strong>: You can create, update, delete, and refresh datasets. This is particularly useful for automating data refreshes and ensuring your reports always display the most current data.</li><li><strong>Report Management</strong>: The API allows you to manage reports, including creating new reports, updating existing ones, and deleting reports that are no longer needed.</li><li><strong>Dashboard Management</strong>: Similar to reports, you can manage dashboards, ensuring that your users have access to the most relevant visualizations.</li></ul><p>2. Administrative Operations:</p><ul><li><strong>User Management</strong>: You can add or remove users from workspaces, assign roles, and manage permissions. This is essential for maintaining security and ensuring that only allowed users have access to sensitive data.</li><li><strong>Workspace Management</strong>: The API allows you to create, update, and delete workspaces, making it easier to organize and manage your Power BI environment.</li></ul><p>3. Embedding Power BI Content:</p><ul><li><strong>Embedding Reports and Dashboards</strong>: One of the most powerful features of the REST API is the ability to embed Power BI reports and dashboards into other applications. <a href="https://www.bing.com/aclick?ld=e8N_7PYAeE2wkP8EaVSA7kmjVUCUyxCTTKiBNtb7qleVKfoWZtpozRuhQ9HRg2KA9R1KNAFz_eMX9fywwxMTTu1u2O1azKaT1vJHmtMga1dMxSci0nlvKhCQldRe9SDK-FqKKTOYMEsFQ8z4o4x6gMVfCaGsr3vmQL7dhwRnh1Fi64ovY2&amp;u=aHR0cHMlM2ElMmYlMmZib29taS5jb20lMmZjb250ZW50JTJmZWJvb2slMmZhaS1uYXRpdmUtYXBpLW1hbmFnZW1lbnQtZ3VpZGUlMmYlM2Z1dG1fc291cmNlJTNkYmluZyUyNnV0bV9tZWRpdW0lM2RwYWlkc2VhcmNoJTI2YWRfcGxhdGZvcm1faWQlM2Q0OTQxOTIwODMtMTI1NDU0NDA3MjEzMzI1OS03ODQwOTEzMzkxOTYwMSUyNnV0bV9jYW1wYWlnbiUzZEVNRUElMjUyMC0lMjUyMEVORyUyNTIwLSUyNTIwU2VhcmNoJTI1MjAtJTI1MjBOb24tQnJhbmQlMjUyMC0lMjUyMEFQSSUyNTIwTWdtdCUyNnV0bV9rZXl3b3JkJTNkYXBpJTI1MjBzZXJ2aWNlJTI2X2J0JTNkNzg0MDkxMzM5MTk2MDElMjZfYmslM2RhcGklMjUyMHNlcnZpY2UlMjZfYm0lM2RwJTI2X2JuJTNkbyUyNl9iZyUzZDEyNTQ1NDQwNzIxMzMyNTklMjZtc2Nsa2lkJTNkMjlmNjI3Yjk5MzdlMTcyYWJiNjI0MTUxYTJhZDE0ZTY&amp;rlid=29f627b9937e172abb624151a2ad14e6">This allows you to provide rich, interactive data visualizations within your own software, enhancing the user experience and providing valuable insights directly within the context of your application</a><a href="https://learn.microsoft.com/en-us/rest/api/power-bi/">1</a>.</li></ul><h3>Why Use Power BI REST API?</h3><p><strong>Automation:</strong></p><ul><li>Automating repetitive tasks such as data refreshes, report generation, and user management can save time and reduce the risk of human error. The REST API allows you to script these tasks, ensuring they are performed consistently and accurately.</li></ul><p><strong>Integration:</strong></p><ul><li>The ability to embed Power BI content into other applications means you can provide a seamless user experience. Whether you’re integrating with a CRM, ERP, or custom application, the REST API makes it easy to incorporate powerful data visualizations and analytics.</li></ul><p><strong>Scalability:</strong></p><ul><li>As your organization grows, so does the complexity of managing your data environment. The REST API provides the tools you need to scale your Power BI implementation, from managing large numbers of datasets and reports to handling user permissions and workspace organization.</li></ul><p><strong>Customization:</strong></p><ul><li>The REST API allows for a high degree of customization, enabling you to tailor Power BI to meet the specific needs of your organization. Whether it’s creating custom reports, automating workflows, or integrating with other systems, the API provides the flexibility you need.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a83dc8da54e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use HTTP/API to get the dataflow refresh history in power automate]]></title>
            <link>https://medium.com/@b00782961/how-to-use-http-api-to-get-the-dataflow-refresh-history-in-power-automate-d105de5899ba?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/d105de5899ba</guid>
            <category><![CDATA[power-bi-training]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Fri, 13 Sep 2024 11:51:54 GMT</pubDate>
            <atom:updated>2024-09-13T11:51:54.551Z</atom:updated>
            <content:encoded><![CDATA[<p>To retrieve historical data for dataflows using the HTTP action in Power Automate, you can use the Power BI REST API. Here’s a step-by-step guide:</p><ol><li>Set Up the HTTP Action:</li></ol><ul><li>In Power Automate, add a new step and select the <strong>HTTP</strong> action.</li><li>Configure the HTTP action with the following details:</li><li><strong>Method</strong>: GET</li><li><strong>URI</strong>: <a href="https://api.powerbi.com/v1.0/myorg/groups/%7BgroupId%7D/dataflows/%7BdataflowId%7D/transactions">https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/transaction</a>s</li></ul><p>2. Get Access Token: You need to obtain an access token to authenticate your request. This can be done using Azure AD and the OAuth 2.0 protocol. You can find more details on how to get an access token here.</p><p>3. Parse the Response:</p><ul><li>Add a <strong>Parse JSON</strong> action to handle the response from the HTTP request. Use a sample payload to generate the schemas.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d105de5899ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use HTTP/API action in Power Automate?]]></title>
            <link>https://medium.com/@b00782961/how-to-use-http-api-action-in-power-automate-058ee3029db8?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/058ee3029db8</guid>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Thu, 12 Sep 2024 12:03:54 GMT</pubDate>
            <atom:updated>2024-10-29T15:23:25.614Z</atom:updated>
            <content:encoded><![CDATA[<p>The HTTP action in Power Automate allows you to interact with web services and APIs. Here’s how you can use it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*YeAfhS1bbAWLWe8Foq-nAA.png" /></figure><h3>URI</h3><ul><li><strong>URI (Uniform Resource Identifier)</strong>: This is the address of the resource you want to interact with. For example, if you’re accessing an API to get weather data, the URI might look like <a href="https://api.weather.com/v3/wx/forecast/daily/5day.">https://api.weather.com/v3/wx/forecast/daily/5day.</a></li></ul><h3>Method</h3><ol><li><strong>GET</strong>: Retrieves data from a server. Think of it as reading information.</li><li><strong>POST</strong>: Sends new data to a server. It’s like submitting a form to create something new.</li><li><strong>PUT</strong>: Updates existing data on a server. Imagine editing a document.</li><li><strong>PATCH</strong>: Partially updates data on a server. It’s like making a small correction to a document.</li><li><strong>DELETE</strong>: Removes data from a server. This is like deleting a file.</li></ol><h3>Body</h3><ul><li><strong>Body</strong>: This is the data you send to the server when making a request, typically used with POST, PUT, and PATCH methods. It’s usually in JSON format. For example:</li><li>{ &quot;name&quot;: &quot;John Doe&quot;, &quot;email&quot;: &quot;john.doe@example.com&quot; }</li></ul><h3><strong>Cookie</strong></h3><ul><li><strong>Cookie</strong>: This is a small piece of data stored on the client side and sent to the server with each request. It’s often used for session management and tracking user activity.</li></ul><h3>Authentication Types</h3><ol><li><strong>None</strong>: No authentication required.</li><li><strong>Basic</strong>: Uses a username and password encoded in base64.</li><li><strong>API Key</strong>: Uses a unique key provided by the service.</li><li><strong>OAuth 2.0</strong>: A token-based authentication method, often used for secure access.</li><li><strong>Azure AD</strong>: Uses Azure Active Directory for authentication.</li><li><strong>Custom</strong>: Any other method specified by the API, often involving custom headers or tokens.</li></ol><p><a href="https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/web">These elements help you interact securely and effectively with web services in Power Automate</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=058ee3029db8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Join Parallel Branches in Power Automate]]></title>
            <link>https://medium.com/@b00782961/how-to-join-parallel-branches-in-power-automate-94384ebba3a7?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/94384ebba3a7</guid>
            <category><![CDATA[power-automate-flow]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[power-automate]]></category>
            <category><![CDATA[data-analyst]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Thu, 12 Sep 2024 08:34:37 GMT</pubDate>
            <atom:updated>2024-09-12T08:34:37.056Z</atom:updated>
            <content:encoded><![CDATA[<p>In Power Automate, it is not that straightforward to join 2 branches, what if we want to place the action APPY TO EACH after these two steps Create a file and Analyst JSON together so that these two actions can be run at the same time?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*GO7fpO8UF3BCryeH_jwMIQ.png" /></figure><ol><li>Click action Apply to each</li><li>Click Paramètres</li><li>Click Select actions in the Run after section</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*tInhhyD9jS6qFo6M6R0gtw.png" /></figure><p>4. Click Analyse JSON in this example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*NAp9-5VRNZOHMN-BxtccYA.png" /></figure><p>And voila! You will get the result you want!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*VY6HXfmY8K40zgJop7VL2g.png" /></figure><p>Follow me for more tricks and tips about business intelligence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94384ebba3a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to write M code to group the timestamp by 30 seconds In Power Query]]></title>
            <link>https://medium.com/@b00782961/how-to-write-m-code-to-group-the-timestamp-by-30-seconds-in-power-query-239951b65828?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/239951b65828</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[business-analysis]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[power-query]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 08:11:14 GMT</pubDate>
            <atom:updated>2024-09-02T08:11:14.885Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine this secenario, suppose you have a table that records the transaction data of your company’s business activities, how would you deal with it if you need to group the transaction by30 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BGbYLAhkW0pijssi" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Which means you need to transform the the column of Date from the picture below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*bbCb640EDDqH3Lb95pzpGg.png" /></figure><p>to this format alike,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/158/1*dvJFjGOO7HAakm4deTL0bQ.png" /></figure><p>What should we do? It is a common task for business intelligence engineer for juniors or interns.</p><p>Working with timestamps in Power Query often involves some level of manipulation. One common task is rounding timestamps to a specific interval, such as the nearest 30 seconds. This blog post will guide you through the process, highlighting the steps and considerations, especially for the French version of Power Query.</p><h3>The Challenge:</h3><p>Imagine you have a column of timestamps with seconds precision, and you need to group or analyze them in 30-second intervals. For instance, you want to convert:</p><p>2024–09–01 12:27:18 to 2024–09–01 12:27:00<br>2024–09–01 12:27:42 to 2024–09–01 12:27:30</p><h3><strong>Step-by-Step Solution:</strong></h3><p><strong>Start with Your Data: </strong>Assume your table has a column named “Début” containing your timestamps.</p><p><strong>Data Type Conversion (if necessary): </strong>Ensure that the “Début” column is of the datetimezone data type. You can convert it using the “Change Type” feature in Power Query.</p><p><strong>Create a Custom Column: </strong>Add a custom column to your table using the following M code:</p><pre>-m<br>   #&quot;Added Custom&quot; = Table.AddColumn(#&quot;Previous Step Name&quot;, &quot;Regroupement30s&quot;, each <br>       let<br>           DateTime = [Début],<br>           DateTimeWithoutZone = DateTimeZone.RemoveZone(DateTime),<br>           FormattedDateTime = DateTime.ToText(DateTimeWithoutZone, &quot;yyyy-MM-dd HH:mm:ss&quot;),<br>           Minutes = Number.FromText(Text.Middle(FormattedDateTime, 14, 2)),<br>           Seconds = Number.FromText(Text.Middle(FormattedDateTime, 17, 2)),<br>           RoundedSeconds = if Seconds &lt; 30 then 0 else 30,<br>           Result = DateTime.From(Text.Start(FormattedDateTime, 14) &amp; Text.From(RoundedSeconds))<br>       in<br>           Result, type datetime)<br>   in<br>   #&quot;Added Custom&quot;</pre><p><strong>Explanation:</strong></p><ul><li><strong>Removing Time Zones:</strong> We use DateTimeZone.RemoveZone(DateTime) to remove timezone information. This is crucial because directly converting a datetimezone with timezone information to text can cause errors.</li><li><strong>Extracting Minutes and Seconds:</strong> Using Text.Middle(), we extract the minutes and seconds from the formatted datetime string.</li></ul><blockquote>Text.Middle(FormattedDateTime, 14, 2) which means that we extract the text from the 14th element to 15th element in the text; 14 is the starting point and 2 is the number of elements you would like to extract from the text.</blockquote><ul><li><strong>Calculating Rounded Seconds:</strong> A simple if statement determines if the seconds should be rounded down to 0 or up to 30.</li><li><strong>Constructing the Final Timestamp:</strong> We cleverly rebuild the timestamp string, inserting the RoundedSeconds in the correct position, ensuring our final timestamp has the desired seconds value.</li><li><strong>Converting Back to DateTime:</strong> Finally, DateTime.From() converts the string back into a DateTime value.</li></ul><p><strong>Result:</strong></p><p>You will now have a new column, “Regroupement30s”, containing your original timestamps rounded to the nearest 30 seconds.</p><p><strong>Key Points:</strong></p><ul><li>Pay close attention to data types and necessary conversions.</li><li>The French version of Power Query might have subtle differences in function names and syntax compared to the English version.</li><li>This approach demonstrates the power of string manipulation for specific date and time formatting tasks in Power Query.</li></ul><p>By following these steps, you can effectively round timestamps in Power Query (French version) and simplify your data analysis and grouping processes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=239951b65828" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Identifying Weekends From Date Column in Power Query]]></title>
            <link>https://medium.com/@b00782961/identifying-weekends-from-date-column-in-power-query-54c6b71f84a3?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/54c6b71f84a3</guid>
            <category><![CDATA[business-analyst]]></category>
            <category><![CDATA[power-query]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Thu, 29 Aug 2024 14:30:43 GMT</pubDate>
            <atom:updated>2024-08-29T14:30:43.531Z</atom:updated>
            <content:encoded><![CDATA[<p>There are 2 ways to add a personalised column about identifying weekends from date column in power query</p><p>FIRST, you can click Add a New Column tab in power query and click personalised column and insert the formula below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*dw2eab0iqBlnzHL-R2FNYw.png" /></figure><p>SECOND way is to add a line of M code directly in advanced query editor:</p><p>#”Personalised Col&quot; = Table.AddColumn(#”Last Step”, “EnWeekend”, each if Date.DayOfWeek([Début], Day.Sunday) &gt;= 5 then 1 else 0)</p><p>After you inserting this line of M code into your advanced query editor, you will see this in your formula bar:</p><p>= Table.AddColumn(#”Last Step”, “EnWeekend”, each if Date.DayOfWeek([Date], Day.Sunday) &gt;= 5 then 1 else 0)</p><p>Table.AddColumn: This function adds a new column to an existing table.</p><ul><li>#&quot;Last Step&quot;: This refers to the previous step in your query. It represents the table you are working with.</li><li>&quot;EnWeekend&quot;: This is the name of the new column you are adding. In this case, it’s named “EnWeekend”.</li></ul><p>each if Date.DayOfWeek([Date], Day.Sunday) &gt;= 5 then 1 else 0: This part defines the logic for the new column.</p><ul><li>each: This keyword indicates that the following expression will be applied to each row in the table.</li><li>Date.DayOfWeek([Date], Day.Sunday): This function returns the day of the week for the date in the [Date] column, with Sunday as the first day of the week.</li><li>[Date]: This is the column in your table that contains the date values.</li><li>Day.Sunday: This specifies that Sunday is considered the first day of the week (0), Monday is 1, and so on.</li><li>&gt;= 5: This checks if the day of the week is greater than or equal to 5 (i.e., Saturday or Sunday).</li><li>then 1 else 0: This is a conditional statement. If the day of the week is Saturday or Sunday, it returns 1 (indicating a weekend); otherwise, it returns 0.</li></ul><p>So, this code adds a new column named “EnWeekend” to your table. The new column will contain a 1 if the date in the [Date] column is a weekend (Saturday or Sunday) and a 0 if it is a weekday.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54c6b71f84a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power Query vs. DAX: When to Use Each in Power BI]]></title>
            <link>https://medium.com/@b00782961/power-query-vs-dax-when-to-use-each-in-power-bi-5ee6f2046ddd?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ee6f2046ddd</guid>
            <category><![CDATA[dax-formula]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[business-analyst]]></category>
            <category><![CDATA[power-query]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Thu, 29 Aug 2024 14:09:08 GMT</pubDate>
            <atom:updated>2024-08-29T14:09:08.091Z</atom:updated>
            <content:encoded><![CDATA[<p>Power BI is a powerful tool for data analysis and visualization, and it offers two primary methods for data manipulation: Power Query and DAX (Data Analysis Expressions). Both have their unique strengths and are suited for different tasks. Understanding when to use each can significantly enhance your data modeling and reporting efficiency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NQFCl3tLQvr3OQad" /><figcaption>Photo by <a href="https://unsplash.com/@zgraves?utm_source=medium&amp;utm_medium=referral">Zach Graves</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is Power Query?</h3><p>Power Query is a data connection technology that enables you to discover, connect, combine, and refine data across a wide variety of sources. It is primarily used for data preparation and transformation before loading the data into Power BI.</p><h4>When to Use Power Query:</h4><p>Data Preparation and Transformation:</p><ul><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Extract, Transform, Load (ETL)</strong>: Power Query is ideal for ETL processes where you need to clean, transform, and load data from various sources1</a>.</li><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Complex Data Shaping</strong>: Use Power Query for complex data shaping tasks like pivoting, unpivoting, and merging tables1</a>.</li><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Static Data Transformations</strong>: If your data transformations do not need to be dynamic and can be done once during data load, Power Query is the way to go1</a>.</li></ul><p>Row-Level Operations:</p><ul><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Row-Level Calculations</strong>: For operations that need to be performed on each row of your data, such as adding a new column based on existing columns</a><a href="https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/">2</a>.</li><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Data Type Conversions</strong>: When you need to convert data types or perform string manipulations1</a>.</li></ul><p>Error Handling:</p><ul><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Custom Error Handling</strong>: Power Query allows for custom error-handling logic, which can be crucial for ensuring data quality1</a>.</li></ul><h3>What is DAX?</h3><p>DAX is a formula language used in Power BI, Excel, and SQL Server Analysis Services to create custom calculations on data models. It is designed to work with relational data and perform dynamic aggregations.</p><h4>When to Use DAX:</h4><ol><li>Dynamic Calculations:</li></ol><ul><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Real-Time Calculations</strong>: DAX is executed in real-time when a user interacts with a report, making it ideal for dynamic calculations that need to update based on user inputs1</a>.</li><li><a href="https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/"><strong>Measures and Calculated Columns</strong>: Use DAX to create measures and calculated columns that aggregate data or perform calculations based on the current filter context2</a>.</li></ul><p>Complex Aggregations:</p><ul><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Advanced Aggregations</strong>: For complex aggregations and calculations that involve multiple tables or need to consider the relationships between tables1</a>.</li><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>Time Intelligence</strong>: DAX is particularly powerful for time-based calculations, such as year-to-date, quarter-to-date, and moving averages1</a>.</li></ul><p>Interactivity:</p><ul><li><a href="https://www.popautomation.com/post/power-bi-dax-vs-power-query"><strong>User Interactions</strong>: When you need calculations to respond to user interactions like slicers, filters, and other visual elements1</a>.</li></ul><h3>Choosing Between Power Query and DAX</h3><p>The choice between Power Query and DAX often depends on the specific requirements of your data model and reporting needs:</p><ul><li><strong>Use Power Query</strong> for data preparation and transformations that can be done once during data load. It is efficient for handling large datasets and performing complex data shaping tasks.</li><li><strong>Use DAX</strong> for dynamic calculations that need to update in real-time based on user interactions. It is ideal for creating measures and calculated columns that aggregate data and perform advanced calculations.</li></ul><p>By leveraging the strengths of both Power Query and DAX, you can create robust and efficient data models in Power BI that cater to a wide range of analytical needs.</p><p>I hope this helps clarify when to use Power Query and when to use DAX in Power BI! If you have any more questions or need further assistance, feel free to ask.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ee6f2046ddd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to transform UTC DateHour to Day of Week in Power Query]]></title>
            <link>https://medium.com/@b00782961/how-to-transform-utc-datehour-to-day-of-week-in-power-query-97644606cd93?source=rss-a2c04e3d2977------2</link>
            <guid isPermaLink="false">https://medium.com/p/97644606cd93</guid>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[m-language]]></category>
            <category><![CDATA[power-query-editor]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[power-query]]></category>
            <dc:creator><![CDATA[Felix Yip]]></dc:creator>
            <pubDate>Thu, 29 Aug 2024 14:03:04 GMT</pubDate>
            <atom:updated>2024-08-29T14:03:04.407Z</atom:updated>
            <content:encoded><![CDATA[<p>In power query of Power BI, how can we extrac the Day of Week from UTC date hour column?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FU-CM4ITmgb37dIa" /><figcaption>Photo by <a href="https://unsplash.com/@goumbik?utm_source=medium&amp;utm_medium=referral">Lukas Blazek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For example if the format of date column looks like this, how can we add a personalised new col to show which day of week from Monday to Sunday?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/171/1*drCPPZgJgzJ5H_n1gpdIRg.png" /></figure><p>Normally we would tend to use FromText function as follows:</p><p>= Table.RenameColumns(#”Lines ordered”,”DayOfWeek”, each Date.DayOfWeekName(DateTime.<strong>FromText</strong>([Beginning])))</p><p>It will pop out errors below because of the format of UTC Date Hour column</p><blockquote>Expression.Error: Sorry… We could not convert the value #datetimezone(2024, 8, 11, 9, 2, 13.43, 2, 0) to type Text.<br>Details:<br>Value=11/08/2024 09:02:13 +02:00<br>Type=[Type]</blockquote><p>The problem that the UTC date hour column contains time zone information so that you can not convert it to the text format, instead, we need to remove the zone information</p><p>Here is the correct M code in the advanced query:</p><blockquote>= Table.AddColumn(#”Lignes triées”, “DayOfWeek”, each Date.DayOfWeekName(DateTimeZone.<strong>RemoveZone</strong>(DateTimeZone.From([Début]))))</blockquote><p>Or to insert a personalised column by using this formula alike</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*Kc1eDeeFsD7slx0_qYKaVA.png" /></figure><ol><li>Table.AddColumn: This function adds a new column to an existing table.</li><li>#&quot;Lignes triées&quot;: This is the name of the existing step in power query to which you are adding the new column.</li><li>&quot;DayOfWeek&quot;: This is the name of the new column being added.</li><li>each Date.DayOfWeekName(DateTimeZone.RemoveZone(DateTimeZone.From([Début]))): This part defines the values for the new column. Here’s what it does:</li></ol><ul><li>DateTimeZone.From([Début]): Converts the value in the [Début] column to a DateTimeZone type.</li><li>DateTimeZone.RemoveZone: Removes the time zone information from the DateTimeZone value, converting it to a DateTime type.</li><li>Date.DayOfWeekName: Extracts the name of the day of the week (e.g., Monday, Tuesday) from the DateTime value.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97644606cd93" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>