<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hat Full of Data</title><link>https://hatfullofdata.blog/</link><description>Recent content on Hat Full of Data</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Wed, 15 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://hatfullofdata.blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Humbled and Honoured</title><link>https://hatfullofdata.blog/humbled-and-honoured/</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0000</pubDate><guid>https://hatfullofdata.blog/humbled-and-honoured/</guid><description>&lt;img src="https://hatfullofdata.blog/humbled-and-honoured/cover.png" alt="Featured image of post Humbled and Honoured" /&gt;&lt;p&gt;Today I got the news I get to be a Data Platform MVP for another year!&lt;/p&gt;
&lt;p&gt;As tradition dictates I am of course Humbled and Honoured. In reality though, I&amp;rsquo;m hugely grateful to lots of people who let me be me in this community.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hosts of user groups and conferences who create the place for us to meet and present&lt;/li&gt;
&lt;li&gt;Helpers who make conferences work, tell me when to end a session and help me find my room&lt;/li&gt;
&lt;li&gt;Humans who came to my sessions, read my blog, watched my youtube channel, asked questions and made it feel worth while. If any non-humans were involved I am of course grateful to them as well.&lt;/li&gt;
&lt;li&gt;Hecklers&lt;sup&gt;1&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;Handful of friends who have shared the highs, the hurdles, headaches and the hilarity of another year in tech.&lt;/li&gt;
&lt;li&gt;Hubby, Harry, who has done the airport drop offs and pickups, cooked while I build slides and demos, never complains when head off to another conference or user group.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Turns out H is a great letter.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MVP Dark Blue Badge includes the words Microsoft Most Valuable Professional" class="gallery-image" data-flex-basis="640px" data-flex-grow="266" height="540" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/humbled-and-honoured/MVP_Digital_RGB_36_badge_single_color_dark_blue.png" srcset="https://hatfullofdata.blog/humbled-and-honoured/MVP_Digital_RGB_36_badge_single_color_dark_blue_hu_1630665eb5e46d72.png 800w, https://hatfullofdata.blog/humbled-and-honoured/MVP_Digital_RGB_36_badge_single_color_dark_blue.png 1440w" width="1440"&gt;&lt;/p&gt;
&lt;p&gt;The award comes with a badge, an updated one this year, but in reality the award opened doors for me to an amazing community. We use the ever changing, name changing, icon changing&lt;sup&gt;2&lt;/sup&gt; tech as an excuse to gather, but we stay because of the community of wonderfully diverse, usually neurodivergent and amazing humans we are.&lt;/p&gt;
&lt;p&gt;A huge thank you to my co-speakers this year Claire Edgson, Joe Griffin, Lewis Baybutt and Will Johnson. We rocked!&lt;/p&gt;
&lt;p&gt;Also to Mark Pryce-Mayer who makes me laugh and fixes the lakehouses I break, Sue Bayes who makes me smile every week, Alex Powers who encouraged me to keep going, Ian Tweedie who helped me transfer my blog from wordpress to Hugo, so blogging will again be enjoyable and Ash Graham-Brown who did the accessibility work to make sure a screen reader makes some sense on my blog.&lt;/p&gt;
&lt;p&gt;And last, but never least, Rie Merritt who looks after us Data Platform MVPs, keeps us in line and always supports us non-males in a male dominated industry.&lt;/p&gt;
&lt;p&gt;My advice to anyone looking in on the community, unsure how to join, please reach out. Come talk to a speaker after a session, ask the questions, be brave and say hello. Many of us are incredibly shy, anxious and imposter syndrome is our best skill, so we understand your shyness. You are one of us, I promise. Take a look at my &lt;a class="link" href="https://hatfullofdata.blog/upcoming-events/" target="_blank" rel="noopener"
 &gt;Upcoming Events page&lt;/a&gt; and if you are going to be at one of them reach out to me beforehand and we can have a coffee together and I&amp;rsquo;ll introduce to people you want to meet.&lt;/p&gt;
&lt;hr&gt;
&lt;sup&gt;1&lt;/sup&gt; You know who you are&lt;br&gt;
&lt;sup&gt;2&lt;/sup&gt; Microsoft stop it!</description></item><item><title>Using Variable Library in a Dataflow</title><link>https://hatfullofdata.blog/using-variable-library-in-a-dataflow/</link><pubDate>Wed, 11 Feb 2026 17:21:24 +0000</pubDate><guid>https://hatfullofdata.blog/using-variable-library-in-a-dataflow/</guid><description>&lt;img src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/cover.png" alt="Featured image of post Using Variable Library in a Dataflow" /&gt;&lt;p&gt;One of the popular low-code tools within Microsoft Fabric is the Gen2 Dataflow. Power BI report builders already know some Power Query. So armed with this knowledge is a popular starting point to load data into Microsoft Fabric. Adding values from the Variable Library in a Dataflow is an obvious plan to make it more future proof and to work better with Deployment pipelines.&lt;/p&gt;
&lt;p&gt;I will confess the first time I tried these I could not get them to work till I read the instructions correctly. So they do work just understand the limitations!&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/"&gt;Variable Values in a Data Pipeline&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/"&gt;Variable Values in Lakehouse Shortcuts&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in Dataflows&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=""&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;For this post we are going to use the scenario of a dataflow query that lists projects. Whilst we are developing the data handling we want to limit the number of rows loaded and in production we will have no limit.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the steps described in the next paragraph." class="gallery-image" data-flex-basis="379px" data-flex-grow="158" height="430" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I create the dataflow and then using Keep Rows, I select Keep top rows. In the next dialog I enter 5 and click OK. This results in a table with only 5 rows of data. The number of rows though needs to come from the variable library.&lt;/p&gt;
&lt;h2 id="getting-the-value"&gt;Getting the Value
&lt;/h2&gt;&lt;p&gt;The next step is to get the value from the variable library into the dataflow. We are going to use a new Power Query function for this called &lt;strong&gt;Variable.ValueOrDefault&lt;/strong&gt;. For the first parameter of this function, you need the Variable Library name and a Variable name. Then you combine together in a string.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;$(/**/&amp;lt;Library Name&amp;gt;/&amp;lt;Variable Name&amp;gt;)&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;So for my example the string will be &lt;strong&gt;“$(/**/Finance Variables/Limit)”&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="snapshots of getting the variable value from variable library in a dataflow" class="gallery-image" data-flex-basis="582px" data-flex-grow="242" height="280" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;blockquote class="alert alert-note"&gt;
 &lt;div class="alert-header"&gt;
 &lt;span class="alert-icon"&gt;📝&lt;/span&gt;
 &lt;span class="alert-title"&gt;Instructions&lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="alert-body"&gt;
 &lt;ol&gt;
&lt;li&gt;On the Home ribbon, expand Get data and select Blank query.&lt;/li&gt;
&lt;li&gt;Rename the query to DataRows.&lt;/li&gt;
&lt;li&gt;Then in the formula bar enter in the code below.&lt;/li&gt;
&lt;li&gt;This will return the current value of the variable in the library.&lt;/li&gt;
&lt;/ol&gt;
 &lt;/div&gt;
 &lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Variable.ValueOrDefault(&amp;#34;$(/**/Finance Variables/Limit)&amp;#34;,2)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;blockquote class="alert alert-tip"&gt;
 &lt;div class="alert-header"&gt;
 &lt;span class="alert-icon"&gt;💡&lt;/span&gt;
 &lt;span class="alert-title"&gt;Tip&lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="alert-body"&gt;
 &lt;p&gt;The documentation as of publishing this post states it won’t work hence we use the OrDefault function and in this example the default is 2. It does work though, and we can see the answer 8 comes through.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/blockquote&gt;
&lt;h2 id="using-the-variable-value"&gt;Using the Variable Value
&lt;/h2&gt;&lt;p&gt;We’ve got the variable value from the variable library in a dataflow, now we need to use it. In the last line of my project query that limited the query to 5 rows I can replace the 5 with DataRows. I now get 8 rows of data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the data table showing there are only 8 rows of data" class="gallery-image" data-flex-basis="468px" data-flex-grow="195" height="348" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This works as long as we always want to limit the rows, the chances are in production we don’t want to limit, so I add the extra of only limit if DataRows is greater than 0. Here is my new statement, the previous step is call Sorted Rows hence the #”Sorted rows”&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;if DataRows &amp;gt; 0 then Table.FirstN(#&amp;#34;Sorted rows&amp;#34;, DataRows) else #&amp;#34;Sorted rows&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="references-for-variable-library-in-a-dataflow"&gt;References for Variable Library in a Dataflow
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/dataflow-gen2-variable-library-integration?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Microsoft – Use Fabric variable libraries in Dataflow Gen2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/powerquery-m/variable-valueordefault?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Power Query Reference for Variable.ValueOrDefault&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="conclusion-on-using-variable-library-in-a-dataflow"&gt;Conclusion on using variable library in a dataflow
&lt;/h2&gt;&lt;p&gt;Its great we can bring in the values easily. Its a shame that we can’t use them to control the destination, but that is on the road map for 2026 Q1. I’ll blog about it as soon as it arrives! I highly recommend using my pattern of fetching the value as a query and then referring to that. It will help in debugging etc.&lt;/p&gt;</description></item><item><title>Using a Variable Library in Lakehouse Shortcuts</title><link>https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/</link><pubDate>Mon, 26 Jan 2026 18:43:51 +0000</pubDate><guid>https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/</guid><description>&lt;img src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/cover.png" alt="Featured image of post Using a Variable Library in Lakehouse Shortcuts" /&gt;&lt;p&gt;Lakehouse shortcuts are a popular addition to the Fabric set of tools to access data easily without copying it. Using a variable library in lakehouse shortcuts means its easy to point shortcuts to an alternative location. This great for ALM using development, test and production workspaces.&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/"&gt;Variable Values in a Data Pipeline&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in Lakehouse Shortcuts&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/"&gt;Variable Values in Dataflows&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=""&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="setting-up-the-shortcuts"&gt;Setting Up the Shortcuts
&lt;/h2&gt;&lt;p&gt;Using the standard GUI you have no option to use a variable library values in the setup of the shortcuts. So set up your shortcuts as you normally and make sure they work. For this post I’m using a shortcut to a table in warehouse. (I had a whole barny with lakehouses and schemas and it not working – another post for another time!)&lt;/p&gt;
&lt;p&gt;&lt;img alt="snapshot of a projects shortcut in the explorer pane." class="gallery-image" data-flex-basis="577px" data-flex-grow="240" height="416" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-12.png" srcset="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-12_hu_3c99a595335523c2.png 800w, https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-12.png 1001w" width="1001"&gt;&lt;/p&gt;
&lt;p&gt;According to the documentation using the rest API also does not allow for the use of variables in the creation of shortcuts.&lt;/p&gt;
&lt;h2 id="viewing-the-options"&gt;Viewing the Options
&lt;/h2&gt;&lt;p&gt;If we select the short cut and click on the 3 dots to expand the menu we can then click on Manage Shortcut. This opens a pan that shows the values behind the shortcut. The values that be populated from a variable library have a Variable drop down, so we can see Target workspace, Target item and Target path.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the exploere and manage shortcut panes" class="gallery-image" data-flex-basis="292px" data-flex-grow="121" height="558" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-13.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I only want to populate the workspace and item guids, so I set up a those variables in my variable library. The variables must be set up as strings, they might look like guids but the shortcut demands they are strings. I set the default values to match the current values. When we apply each variables it will check the current values work so it only works if you use the current values.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the variable library" class="gallery-image" data-flex-basis="620px" data-flex-grow="258" height="263" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-15.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="applying-the-variables"&gt;Applying the Variables
&lt;/h2&gt;&lt;p&gt;Back in the Manage Shortcut pane click on the Variable below the current value to expand that section. Then click on Select variable to open the Select variable dialog. Click on the correct variable and then click Select Variable. This will update the value to come from the variable.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshots of clicking on select variable and selecting the right one" class="gallery-image" data-flex-basis="538px" data-flex-grow="224" height="303" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/image-16.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you have pointed it to the variable there does not appear to be a method to change back to a hard coded value.&lt;/p&gt;
&lt;h2 id="updating-variable-values"&gt;Updating Variable Values
&lt;/h2&gt;&lt;p&gt;Variable values will get updated, the most common being a different active set being selected. For other artifacts the change will get picked up when they execute or refresh. For shortcuts this is slightly different. You need to force the updating of variables.&lt;/p&gt;
&lt;p&gt;Open the lakehouse and stay in the lakehouse view. On the ribbon the last button is Update all variables. A message will show the updating is taking and finally there will be a notification to say they have been updated.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Updating variable library in lakehouse shortcuts" class="gallery-image" data-flex-basis="228px" data-flex-grow="95" height="682" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/2026-01-26_16-40-32.png" width="648"&gt;&lt;/p&gt;
&lt;p&gt;If one of the shortcut fails in the update please be aware the successful ones will have updated. You do get a notification and an error message that tries to help.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshots of updatings the variables" class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="451" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/2026-01-26_16-58-29.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion-on-variable-library-in-lakehouse-shortcuts"&gt;Conclusion on Variable Library in Lakehouse Shortcuts
&lt;/h2&gt;&lt;p&gt;I really like that the variable libraries can be accessed directly in the shortcut details, there is no pre-loading. I would prefer that I could change the values and then press apply so that each value isn’t checked individually. My experience in deployment pipelines means I fell foul of not realising I needed to refresh the variable values.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;Creating Shortcuts – &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-shortcuts?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-shortcuts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Microsoft Learn – &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/onelake/assign-variables-to-shortcuts?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/onelake/assign-variables-to-shortcuts&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Using a Variable Library in a Data Pipeline</title><link>https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/</link><pubDate>Mon, 19 Jan 2026 10:36:26 +0000</pubDate><guid>https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/</guid><description>&lt;img src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/cover.png" alt="Featured image of post Using a Variable Library in a Data Pipeline" /&gt;&lt;p&gt;You’ve set up your variable pipeline with WorkspaceIDs and LakehouseIDs etc etc Now you want to use that variable library in a data pipeline so we can use the common values and they will behave in a deployment pipeline.&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in a Data Pipeline&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/"&gt;Variable Values in Lakehouse Shortcuts&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/"&gt;Variable Values in Dataflows&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=""&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="adding-the-variables-to-the-data-pipeline"&gt;Adding the Variables to the Data Pipeline
&lt;/h2&gt;&lt;p&gt;Before you can use the variable library in a data pipeline you need to add the variables. In your data pipeline you need to click on the grey background to bring up the section on the bottom of the screen with Parameters, Variables etc. If you are in a brand new pipeline you need to click on the settings cog first, then it will appear.&lt;/p&gt;
&lt;p&gt;Select the Library Variables section. Then click on +New and the select variable dialog box appears. If you have multiple variable libraries you can select the right one, you can also search for a variable in the top right. Once you select a variable click on Select Variable button to add that variable to the pipeline.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot showing the Library values section in the pipeline. The the steps to add a variable from a variable library to a data pipelines" class="gallery-image" data-flex-basis="482px" data-flex-grow="201" height="338" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Yes you have to add each variable in turn, no multi-select. You can rename the variables but please don’t, name your variables in your library better.&lt;/p&gt;
&lt;h2 id="using-variable-values"&gt;Using Variable Values
&lt;/h2&gt;&lt;p&gt;You can use the variable values anywhere you can use Dynamic Content. Click on the Add Dynamic content link to open the Pipeline expression builder. Click on the three dots to select Library variables. Click on the variable value you want to use to enter in the formula into the expression. Click OK to put the formula back into the box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of adding dynamic content to get Variable Values" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You can use the variable value inside any functions if required.&lt;/p&gt;
&lt;h2 id="using-variables-for-data-connections"&gt;Using Variables for Data Connections
&lt;/h2&gt;&lt;p&gt;When a data pipeline move from a dev workspace to test workspace and then onto production workspace we need to change the details of the connections to the new values. For this post we will use a connection to a Fabric warehouse in a workspace. I want to pull the values from a table in the warehouse using a lookup action.&lt;/p&gt;
&lt;p&gt;I need to create the following variables in the library:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Project_Warehouse_Connection_ID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Project_Workspace_ID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Project_Warehouse_ID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Project_Warehouse_Connection_String&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="connection-ids"&gt;Connection IDs
&lt;/h3&gt;&lt;p&gt;For the connection guid you need to click on the cog on the top bar and select Manage connections and gateways. From the list of connections, find the one you are using. From the three dots menu select settings. The Connection ID will be listed and can be highlighted and copied.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots of the steps to get a connection ID" class="gallery-image" data-flex-basis="265px" data-flex-grow="110" height="614" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="workspace-warehouse-and-lakehouse-ids"&gt;Workspace, Warehouse and Lakehouse IDs
&lt;/h3&gt;&lt;p&gt;IDs for most artifacts can be found when it is opened. Be aware groups=workspaces in the url. Lakehouses have 2 IDs, one for the lakehouse and one for the SQL analytics endpoint or lakewarehouse as the url names it. No comment on names to confuse us!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the address bar in a browser highlighting the Workspace ID and Warehouse ID" class="gallery-image" data-flex-basis="1833px" data-flex-grow="764" height="89" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="connection-string"&gt;Connection String
&lt;/h3&gt;&lt;p&gt;The final part needed is the connection string for the warehouse or lakehouse. The easiest way to copy this is to open the lakehouse SQL endpoint or the warehouse and in the bottom left hand corner is a Copy SQL connection string link.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen shot of the Copy SQL coonnection string link" class="gallery-image" data-flex-basis="716px" data-flex-grow="298" height="189" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-9.png" width="564"&gt;&lt;/p&gt;
&lt;p&gt;It can also be found in the lakehouse or warehouse settings under SQL analytics endpoint.&lt;/p&gt;
&lt;h3 id="variable-library"&gt;Variable Library
&lt;/h3&gt;&lt;p&gt;All these values need saving into the Variable Library. I’ve used Guid for the IDs and String for the connection string.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the Finance_Variables variable library with the 4 variables setup." class="gallery-image" data-flex-basis="473px" data-flex-grow="197" height="344" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-10.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="using-the-variables-in-the-activities"&gt;Using the Variables in the Activities
&lt;/h2&gt;&lt;p&gt;We now need to use the variable values from the variable library in a data pipeline activity connection. We start by adding all 4 variables to the library. Note the guids become strings.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the Library variables from the variable library in a data pipeline settings." class="gallery-image" data-flex-basis="549px" data-flex-grow="228" height="297" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In this post for simplicity I’m using a Lookup activity to just get all the rows from the projects table. So I add a lookup activity and fill in the general details. On the Settings tab I click the drop down for Connection and select Use dynamic content. In the Add dynamic content pane I find Library Variables under the three dots and select FinanceVariables_Warehouse_Connection_ID so it appears in the expression box. Then I click OK for the Connection to now be an expression.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshots of the steps described in the previous paragraph." class="gallery-image" data-flex-basis="398px" data-flex-grow="165" height="410" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once the connection has been populated you can select the connection type, in my case Warehouse. Then the text boxes appear to take the Workspace ID, Warehouse ID and SQL Connection string. They all have a link to Add dynamic content.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="496px" data-flex-grow="206" height="329" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/Variable-Library-007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The table drop down can be populated by entering manually or by clicking Refresh. This will open a pane showing the values that are going to be used in the connection. Click OK to start it fetching the list of tables. Once a table is selected if you click Preview data the same pane appears confirming values. Its a great way to test the connection works.&lt;/p&gt;
&lt;p&gt;You now have a variable values from a variable library in a data pipeline activity. Well done!&lt;/p&gt;
&lt;h2 id="conclusion-on-using-a-variable-library-in-a-data-pipeline"&gt;Conclusion on Using a Variable Library in a Data Pipeline
&lt;/h2&gt;&lt;p&gt;I like how simple it is to use the variables and that you get to select the variables needed in this data pipeline. I’d prefer if you could add multiple variables at a time. I like the consitent use of the expression builder so its something we get familiar with.&lt;/p&gt;
&lt;p&gt;I’d also really like it if in lineage view you could see which artifacts are using of the variable library and the impact was also included. Maybe oneday!&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/variable-library-integration-with-data-pipelines?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-factory/variable-library-integration-with-data-pipelines&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Accessing a Variable Library in a Notebook</title><link>https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/</link><pubDate>Mon, 12 Jan 2026 09:34:51 +0000</pubDate><guid>https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/</guid><description>&lt;img src="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/cover.png" alt="Featured image of post Accessing a Variable Library in a Notebook" /&gt;&lt;p&gt;This post walks through how to access a variable library in a notebook in Microsoft Fabric. I recommend a Microsoft Fabric project starts by creating a variable library to store the common values different artifacts need and could be changed if a deployment pipeline gets involved. So when we create a notebook we need to be able to use these variables. This means we need load the variable library in a notebook and then get the variable values.&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/variable-library/"&gt;Getting started with variable libraries&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Variable Values in a Fabric Notebook&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/"&gt;Variable Values in a Data Pipeline&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/"&gt;Variable Values in Lakehouse Shortcuts&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/"&gt;Variable Values in Dataflows&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=""&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="connect-to-library"&gt;Connect to Library
&lt;/h2&gt;&lt;p&gt;The first task is to create a variable for the variable library. The notebookutils package includes the functions we need to do this easily. In the code below the variable vl will refer to the variable library that is called “Finance Variables”. This code assumes the notebook is in the same workspace as the library.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Get the Variable library
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vl = notebookutils.variableLibrary.getLibrary(&amp;#34;Finance Variables&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="get-variable-value"&gt;Get Variable Value
&lt;/h2&gt;&lt;p&gt;Once we have the variable library loaded, we can access the variable values in one of two syntaxes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# 2 syntaxes to get variable value
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SP_URL = vl.getVariable(&amp;#34;SharePoint_URL&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Limit = vl.Limit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Combining both of the two and adding some print statements we can demo the above using this code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Get the Variable library
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vl = notebookutils.variableLibrary.getLibrary(&amp;#34;Finance Variables&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# 2 syntaxes to get variable value
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SP_URL = vl.getVariable(&amp;#34;SharePoint_URL&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Limit = vl.Limit
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Check results
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(f&amp;#34;{SP_URL=}&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(f&amp;#34;{Limit=}&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And here is the run&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the code loading variable library in a notebook and the results after it ran." class="gallery-image" data-flex-basis="576px" data-flex-grow="240" height="283" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="get-a-variable-value-by-reference"&gt;Get a variable value by reference
&lt;/h2&gt;&lt;p&gt;There is a third way to get a variable value. The get method from notebookutils variable library uses a reference string that follows the following syntax:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;$(/**/&lt;span class="nt"&gt;&amp;lt;LIBRARY&lt;/span&gt; &lt;span class="err"&gt;NAME&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;/&lt;span class="nt"&gt;&amp;lt;VARIABLE&lt;/span&gt; &lt;span class="err"&gt;NAME&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;)&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Before you get excited that the ** implies you could refer to another workspace, sorry that is not supported. This string is used in the variableLibrary.get action in notebookutils. For example to get the two values from before could be done like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Get the variable values directly
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SP_URL = notebookutils.variableLibrary.get(&amp;#34;$(/**/Finance Variables/SharePoint_URL)&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Limit = notebookutils.variableLibrary.get(&amp;#34;$(/**/Finance Variables/Limit)&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And here is the run&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the code loading variable library in a notebook using references and the results after it ran." class="gallery-image" data-flex-basis="788px" data-flex-grow="328" height="207" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/image-4.png" width="680"&gt;&lt;/p&gt;
&lt;blockquote class="alert alert-tip"&gt;
 &lt;div class="alert-header"&gt;
 &lt;span class="alert-icon"&gt;💡&lt;/span&gt;
 &lt;span class="alert-title"&gt;Tip&lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="alert-body"&gt;
 &lt;p&gt;The print(f&amp;quot;{Limit=}&amp;quot;) prints Limit=4 for us newbies to Python!&lt;/p&gt;
 &lt;/div&gt;
 &lt;/blockquote&gt;
&lt;h2 id="naming-conventions"&gt;Naming Conventions
&lt;/h2&gt;&lt;p&gt;When you start and there are only 4 variables in the library its easy to remember the names to type in by hand when you are using a variable library in a notebook. When it gets to 20 names, its harder. So create standards, whats the case pattern, you using _ between words or not? Pick a set of rules and stick with it, BronzeWorkspaceID works just as well as Bronze_Workspace_ID, WorkspaceID1 and workspace_id2 are a technical debt you don’t need.&lt;/p&gt;
&lt;h2 id="conclusion-on-using-variable-library-in-a-notebook"&gt;Conclusion on using Variable Library in a Notebook
&lt;/h2&gt;&lt;p&gt;I’m really impressed on how easy it is to use the variable library in a notebook. The pattern is simple and resusable. If I had a magic wand it it would be great is the intellisense knew the variable names from loading the variable library object.&lt;/p&gt;
&lt;p&gt;The method by reference is great if you want to dynamically select which variable to load as the string could be dynamically built.&lt;/p&gt;
&lt;p&gt;Using a combination of parameters and accessing a variable library means reusable notebooks are easier to write. This needs to become part of the best practice pattern being used.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;p&gt;Microsoft learn covers Variable library utilities as part of the notebook utilities page.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#variable-library-utilities?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#variable-library-utilities&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Happy New Year and 2025 Review</title><link>https://hatfullofdata.blog/happy-new-year-and-2025-review/</link><pubDate>Wed, 07 Jan 2026 10:52:18 +0000</pubDate><guid>https://hatfullofdata.blog/happy-new-year-and-2025-review/</guid><description>&lt;img src="https://hatfullofdata.blog/happy-new-year-and-2025-review/cover.png" alt="Featured image of post Happy New Year and 2025 Review" /&gt;&lt;h2 id="welcome-to-2026"&gt;Welcome to 2026!
&lt;/h2&gt;&lt;p&gt;In a world full of AI generated content I am very proud that none of the content here on this blog will be AI generated. Mostly because here is my personal notebook of how to do stuff. I still refer back to my first posts from April 2019 on writing SVG. That copy button in code blocks I sorted for my own sanity.&lt;/p&gt;
&lt;p&gt;In the 5+ years of writing this blog I’ve posted 128 posts, had 600k+ views, way too many spam comments and had a subscribe button which over 200 people clicked but never sent an email. I’m hoping this is my first post that will email out to subscribers. Apologies for not sending before and for those who had forgotten they subscribed 3 years ago.&lt;/p&gt;
&lt;h2 id="blog-activity-in-2025"&gt;Blog Activity in 2025
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;17 new posts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;140k views&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I was not as active as I’d like to have been in 2025. No good reasons but it gives me some new goals for 2026. I’m aiming for more regular posts, using tools so I’m not overwhelmed by spam comments.&lt;/p&gt;
&lt;p&gt;The most popular post on this site is how to pull data from a Power BI dataset using Power Automate, it got 10% of last years views. The second place post was Power Automate to trigger a Fabric data pipeline. Just goes to show I should still do the Power Automate working with data stuff posts and add videos.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-activity-in-2025"&gt;YouTube Activity in 2025
&lt;/h2&gt;&lt;p&gt;2025 was also not a good year for video creation for me. I only made 3 videos! Amazingly I got 170k views and gained 800+ subscribers. Another goal for me to improve on video creation and maybe get over that 10k subscribers. Lets see what we can do. For those who haven’t subscribed here is the link&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/c/hatfullofdata123" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/c/hatfullofdata123&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Do let me know if there are videos you think I should do.&lt;/p&gt;
&lt;h2 id="speaking"&gt;Speaking
&lt;/h2&gt;&lt;p&gt;I had a fun year of going to conferences and user groups. It is my second family of speakers and regular attendees and I am incredibly grateful to those who volunteer to make these events happen. From a user group with only 3 attendees to a conference hall with 100 people in it, I love the buzz of sharing knowledge and being a community.&lt;/p&gt;
&lt;p&gt;In May last year I started putting my PowerPoint decks on github with other resources to support sessions. If I’m honest its so I know where I’ve stored my decks when I need to refer to it for a future session or remember what I did last year! Here’s the link&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://github.com/HatFullOfData/Sessions" target="_blank" rel="noopener"
 &gt;https://github.com/HatFullOfData/Sessions&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="looking-forward"&gt;Looking Forward
&lt;/h2&gt;&lt;p&gt;There will be more blog posts, there will be more videos. I enjoy doing them, its helps my mental health. I already have conferences planned that I will be at, speaking or attending. (Love a conference that I just attend occasionally)&lt;/p&gt;
&lt;p&gt;Here are a few of them, if you are going to be there, please come say hello.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://cloudtechtallinn.com/" target="_blank" rel="noopener"
 &gt;https://cloudtechtallinn.com/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://bizappssummit.eu" target="_blank" rel="noopener"
 &gt;https://bizappssummit.eu&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://eoepps.co.uk/" target="_blank" rel="noopener"
 &gt;https://eoepps.co.uk/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://sqlbits.com/" target="_blank" rel="noopener"
 &gt;https://sqlbits.com/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://commsverse.com/" target="_blank" rel="noopener"
 &gt;https://commsverse.com/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Microsoft Fabric – Variable Library</title><link>https://hatfullofdata.blog/variable-library/</link><pubDate>Tue, 06 Jan 2026 13:27:41 +0000</pubDate><guid>https://hatfullofdata.blog/variable-library/</guid><description>&lt;img src="https://hatfullofdata.blog/variable-library/cover.png" alt="Featured image of post Microsoft Fabric – Variable Library" /&gt;&lt;p&gt;This post to help you get started creating a variable library. When multiple dataflows, notebooks and pipelines are using the same details to perform tasks it helps if those values are stored in one place. When you move to use deployment pipelines and those values change from your development workspace to your test workspace to your prod, it helps if that is easy. The solution in Microsoft Fabric is a Variable Library to store those common values.&lt;/p&gt;
&lt;h2&gt;Variable Library Series&lt;/h2&gt;
&lt;p&gt;Variable libraries should be part of every project. This post is part of my series to help get you started creating the library and then using the variables and finally seeing your hard work pay back when it comes to deployment pipelines.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;strong&gt;Getting started with variable libraries&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/accessing-a-variable-library-in-a-notebook/"&gt;Variable Values in a Fabric Notebook&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-a-data-pipeline/"&gt;Variable Values in a Data Pipeline&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-a-variable-library-in-lakehouse-shortcuts/"&gt;Variable Values in Lakehouse Shortcuts&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/using-variable-library-in-a-dataflow/"&gt;Variable Values in Dataflows&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href=""&gt;Variable Libraries in Deployment Pipelines&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="create-a-variable-library"&gt;Create a Variable Library
&lt;/h2&gt;&lt;p&gt;This post assumes the workspace is backed with a Fabric capacity. A trial capacity works just fine.&lt;/p&gt;
&lt;p&gt;Either from a Develop task add item or from the Add item button select Variable Library. Enter in a meaningful name for the variable library, letters, numbers and spaces are allowed. Then click the Create button and your new library will be opened. I recommend you create a naming convention that all your Fabric developers like and agree to use.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Creating a Variable library in the workspace" class="gallery-image" data-flex-basis="250px" data-flex-grow="104" height="980" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/variable-library/Variable-Library-001.png" srcset="https://hatfullofdata.blog/variable-library/Variable-Library-001_hu_6eefbd6f398d0d6b.png 800w, https://hatfullofdata.blog/variable-library/Variable-Library-001.png 1024w" width="1024"&gt;&lt;/p&gt;
&lt;h2 id="add-a-variable"&gt;Add a Variable
&lt;/h2&gt;&lt;p&gt;Your library starts empty, so the next task is to add variables. You can create a new variable row by clicking on + New Variable on the Home ribbon. When there are no variables there will also be a green button in the center of the page to create a new variable.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots of the new variable buttons and the columns Name, Note, Type and Default Value." class="gallery-image" data-flex-basis="482px" data-flex-grow="201" height="338" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/variable-library/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Enter in a meaningful name and select a data type. A name can only include letters, numbers and underscores. An incorrect name will prevent the library from being saved. Please note some types are not usable in some Fabric artifacts, no I haven’t worked out the logic yet but I’m working on it. Enter in a value for the Default value set. Value sets are used when you are using deployment pipelines for the different values you use development,test and production workspaces. Creating and using variable sets will be covered in another post.&lt;/p&gt;
&lt;h2 id="adding-notes"&gt;Adding Notes
&lt;/h2&gt;&lt;p&gt;So that “future you” doesn’t hate the “current you”, it is worth adding notes to variables to explain the purpose of the variable. This should be part of the best practice rules for Fabric development.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grab showing the note button next to the variable name and the Add note to variable dialog box." class="gallery-image" data-flex-basis="290px" data-flex-grow="120" height="562" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/variable-library/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click on the icon in the note column. When there is no note it has a plus symbol and when there is a note it has a pencil symbol.&lt;/p&gt;
&lt;h2 id="saving"&gt;Saving
&lt;/h2&gt;&lt;p&gt;Variable libraries do not auto-save. You need to click the save button on home ribbon. Indicators of black dots will show unsaved items you have open and the save button will only be active when there are changes to save.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I highly recommend starting any Fabric project with creating a variable library. Then everytime a value is used in an artifact such as a database name, key vault name etc a descision is made on if it should be in the variable library or if the value is already there. Some values to be more useful will need to be split across multiple variables.&lt;/p&gt;
&lt;p&gt;It should always be assumed that a workspace with Fabric items will eventually be in a deployment pipeline. This means that it should be coded to make deployment easier. The aim of these articles is for quick reference on how variable libraries are used across all the artifacts.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;p&gt;Microsoft have some getting started articles on setting up a variable library and using it in a deployment pipeline.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/cicd/variable-library/variable-library-overview?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Microsoft Learn Variable Libraries&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Microsoft Fabric – Using Copy Job with Dataverse</title><link>https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/</link><pubDate>Thu, 27 Nov 2025 15:35:41 +0000</pubDate><guid>https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/</guid><description>&lt;img src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/cover.png" alt="Featured image of post Microsoft Fabric – Using Copy Job with Dataverse" /&gt;&lt;p&gt;Dataverse is the data store behind parts of Dynamics and lots of Power Platform projects. So Dataverse can contain vital business data that will be needed for reporting. In this post we are going to look at one method which is using copy job with Dataverse to copy across data in Microsoft Fabric.&lt;/p&gt;
&lt;h2 id="table-of-contents"&gt;Table of Contents
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="#scenario" &gt;Scenario&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#first-copy-job-dataverse-connector" &gt;First Copy Job – Dataverse Connector&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#copy-job-run" &gt;Copy Job Run&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#copy-job-using-sql-server-connection" &gt;Copy Job using SQL Server connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#i" &gt;Incremental and Merge Running&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#trouble-shooting" &gt;Trouble Shooting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#alternative-options-to-using-copy-job-with-dataverse" &gt;Alternative Options to using Copy Job with Dataverse&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="#conclusion" &gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;For this post we will look at 2 tables, Accounts and Contacts so all the code will be common to any Dataverse environment. I have 5 Account records and 10 Contact records. I also have the environment path org29d4c6d3.crm11.dynamics.com.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots showing the records in dataverse" class="gallery-image" data-flex-basis="392px" data-flex-grow="163" height="416" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-17.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In Microsoft Fabric I have a workspace, Finance Reporting, with a Lakehouse, Finance_Lakehouse.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="143px" data-flex-grow="59" height="802" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-18.png" width="479"&gt;&lt;/p&gt;
&lt;h2 id="first-copy-job--dataverse-connector"&gt;First Copy Job – Dataverse Connector
&lt;/h2&gt;&lt;p&gt;Copy Job is a great artifact to move data easily into Fabric. Simplest version just copies data, we can then add incremental and merging. More details can be found here &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/what-is-copy-job?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-factory/what-is-copy-job&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For the first example we will copy from Dataverse using the Dataverse connector. The wizard that walks you through creating a Copy Job has 6 steps. For this first one we will walk through each step.&lt;/p&gt;
&lt;h3 id="create-copy-job"&gt;Create Copy Job
&lt;/h3&gt;&lt;p&gt;Either using a task flow Get Data’s add item or using Add item in the workspace, select Copy job. Type in a name and click Create.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Selecting Copy and naming it as described in the instructions" class="gallery-image" data-flex-basis="600px" data-flex-grow="250" height="272" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-19.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="choose-data-source"&gt;Choose Data Source
&lt;/h3&gt;&lt;p&gt;Next step is connecting to Dataverse. For this example we are using the Dataverse connector. Click on the Dataverse option under New sources. When the next screen appears enter in the Environment domain. If it is your first time connecting there you will be given the option to name your connection and select a privacy level. It will guess the authentication and login – this is not the blog to discuss options here.&lt;/p&gt;
&lt;p&gt;Once these are done click Next&lt;/p&gt;
&lt;p&gt;&lt;img alt="selecting the dataverse connector and entering details as described in the paragraph above" class="gallery-image" data-flex-basis="222px" data-flex-grow="92" height="732" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-20.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="choose-data"&gt;Choose Data
&lt;/h3&gt;&lt;p&gt;Choosing the data is very simple, the next screen lists the tables from dataverse using their display names and logical names in brackets. Yes they call them Entities…. No comment. If you expand a table the logical names of fields are listed. There is a search box that will allow you to search for a table using either of the names. If you have selected a table the search will expand to the field names as well. Interestingly for choice columns you only get the code column, not the name column. That is going to be another post!&lt;/p&gt;
&lt;p&gt;If you select a table all the columns will be imported. You select the required columns manually by selecting individual columns, its a touch manual and requires searching and scrolling lots in my experience. Next version is better in my opinion – feel free to scroll down!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing table and column selection" class="gallery-image" data-flex-basis="497px" data-flex-grow="207" height="328" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-21.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you’ve selected your tables and columns click Next.&lt;/p&gt;
&lt;h3 id="choose-data-destination"&gt;Choose Data Destination
&lt;/h3&gt;&lt;p&gt;Data destination is another easy step. Select your lakehouse from the OneLake catalog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="OneLake catalog" class="gallery-image" data-flex-basis="562px" data-flex-grow="234" height="290" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-22.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="choose-copy-job-mode"&gt;Choose copy job mode
&lt;/h3&gt;&lt;p&gt;With the dataverse connector you only get one option, Full copy. In the Map to destination you get to choose if that is an append or overwrite.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Full copy - sadly the only option" class="gallery-image" data-flex-basis="877px" data-flex-grow="365" height="186" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-23.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="map-to-destination"&gt;Map to destination
&lt;/h3&gt;&lt;p&gt;The next screen shows update method and the tables being imported. Clicking on Edit update method will give you the option of Append or Overwrite. Append is the default but this will just duplicate you data every time you run this copy job. I have changed it to Overwrite. Merge is not available in this version.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Map to destination screen highlighting links to Edit update method and the Edit column mappings links" class="gallery-image" data-flex-basis="422px" data-flex-grow="176" height="386" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-24.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You can enter names for your destination tables and click Edit column mappings to tweak column names or remove some mapping. The columns selected will match the columns you selected back in Choose data.&lt;/p&gt;
&lt;p&gt;Click Next once you are happy.&lt;/p&gt;
&lt;h3 id="review--save"&gt;Review + save
&lt;/h3&gt;&lt;p&gt;The final screen will give you an overview of what the copy job is going to do. You can select if you want it to run now, run once or scheduled. I’m choosing to let it run so I’ll just click Save + run&lt;/p&gt;
&lt;p&gt;&lt;img alt="Save and review screen for the copy job" class="gallery-image" data-flex-basis="463px" data-flex-grow="193" height="352" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-25.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="copy-job-run"&gt;Copy Job Run
&lt;/h2&gt;&lt;p&gt;When a copy job runs such as after saving in the previous steps you can see the execution happening. Each table is listed and when it succeeds you will see how many rows were read and how many were written. In our example read and written are the same.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Run showing using copy job with dataverse" class="gallery-image" data-flex-basis="462px" data-flex-grow="192" height="353" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-26.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once the run has completed we can go check the Lakehouse and we can see tables. It might need a refresh to show.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Lakehouse showing tables Account_v1 and contact_v1" class="gallery-image" data-flex-basis="493px" data-flex-grow="205" height="331" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-28.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="copy-job-using-sql-server-connection"&gt;Copy Job using SQL Server connection
&lt;/h2&gt;&lt;p&gt;Although the dataverse connector works, the selection of columns is very manual. You also get no option for incremental updates or using merge. So the next example will use SQL Server connector. In a previous post &lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/&lt;/a&gt; I show how you can use SQL on Dataverse with some great hints from Scott Sewell.&lt;/p&gt;
&lt;p&gt;From that post and with the addition of the modifiedon field here is the SQL for the accounts table. We will use this later.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;span class="lnt"&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Select
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	accountid as AccountID,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	name as Account,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	industrycodename as Industry,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; modifiedon,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	statecode,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	statecodename
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;from
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	dbo.account
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="new-copy-job-using-sql-server"&gt;New Copy Job using SQL Server
&lt;/h3&gt;&lt;p&gt;Create a copy job as before giving it a name. For the connector select SQL Server. The Server is the environment path as used before, e.g. org29d4c6d3.crm11.dynamics.com. Remember to edit the connection name and privacy level. There is no point adding a Database, it makes no difference. After you press next you need to wait for the database list to load and then select the only database offered.&lt;/p&gt;
&lt;p&gt;&lt;img alt="connecting to" class="gallery-image" data-flex-basis="463px" data-flex-grow="193" height="352" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-27.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="choose-data-1"&gt;Choose Data
&lt;/h3&gt;&lt;p&gt;The next screen for choosing the data starts by showing you an error. Ignore that, it means you can’t use the interface to select your tables and columns but you can add queries. Expand Queries in the bottom left and click on New query. Type in a name, eg Accounts and then in the query box on the right put in your query. You can check it returns the right data by clicking on preview data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Creating queries with points highlighted to match the instructions" class="gallery-image" data-flex-basis="508px" data-flex-grow="211" height="321" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-32.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Repeat the above for each of your tables and then click Next.&lt;/p&gt;
&lt;h3 id="incremental-and-merge-setup"&gt;Incremental and Merge setup
&lt;/h3&gt;&lt;p&gt;When you choose your lakehouse in the data destination and move onto the copy job mode screen you now get 2 options, Full copy and Incremental copy. The incremental copy will initially copy everything and then in the future will only copy across changes. In order to recognise which records have changed you need a data time column of when it last changed. Hence we have included the modifiedon column.&lt;/p&gt;
&lt;p&gt;So incremental is only going to process updated or new rows, but what do you want done with those new rows? Append will add the newly updated rows giving you the complete history of each row. Overwrite you will loose rows that have not been modified. Merge is currently in preview but would allow you to update the row that matches on a unique field, e.g. Account Id.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Map to destination screen and the update method screen as described in the instructions" class="gallery-image" data-flex-basis="773px" data-flex-grow="322" height="211" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-30.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click Incremental and then Next. In the Map to destination screen, click on Edit update method and select Merge and then select the unique id column for each table. When you click next you will be prompted to select the incremental date time column for each table. Click next to the final stage.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Setting up the Incremental columns for each table" class="gallery-image" data-flex-basis="866px" data-flex-grow="361" height="188" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-31.png" width="679"&gt;&lt;/p&gt;
&lt;h3 id="save-review-and-schedule"&gt;Save, Review and Schedule
&lt;/h3&gt;&lt;p&gt;On the final screen not only do you get to save and review but you also get to schedule due to us picking incremental. You can pick repeat by the minute or hourly and pick dates etc. Be aware incremental requires more compute so will consume compute faster than a straight copy but on huge tables the reduced copy will be worth it.&lt;/p&gt;
&lt;p&gt;Select your options and Save and Run&lt;/p&gt;
&lt;h2 id="incremental-and-merge-running"&gt;Incremental and Merge Running
&lt;/h2&gt;&lt;p&gt;The first time we run just as before the rows read and written include all the data. If we go and edit one row in the accounts table and re-run the copy job, only one row is read and written for the accounts table and nothing for the contacts table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The run history of the initial run showing 10 contacts rows and 5 accounts rows were read and written. And below the second run after a single row in the accounts table was edited in dataverse. It shows one row was read and written in accounts and 0 in contacts." class="gallery-image" data-flex-basis="414px" data-flex-grow="172" height="394" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-33.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="trouble-shooting"&gt;Trouble Shooting
&lt;/h2&gt;&lt;p&gt;In preparation for this post I’ve hit a number of issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Although there is a back button in the wizard, going back to the data source and tweaking the queries just breaks the copy job.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You name a column in the SQL with a space, that update will fail with a weird error. No spaces in column names!&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="alternative-options-to-using-copy-job-with-dataverse"&gt;Alternative Options to using Copy Job with Dataverse
&lt;/h2&gt;&lt;h3 id="link-to-microsoft-fabric"&gt;Link to Microsoft Fabric
&lt;/h3&gt;&lt;p&gt;Using the Link to Microsoft Fabric in Dataverse sounds like a great option. You will be able to add shortcuts in a Lakehouse to the data and it will all be awesome.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Setting up Link to Microsoft Fabric." class="gallery-image" data-flex-basis="441px" data-flex-grow="183" height="370" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-using-copy-job-with-dataverse/image-16.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Just after you select the workspace that the data will go to there are 2 short sentences that you should read carefully.&lt;/p&gt;
&lt;p&gt;“We will link all tables so that you don’t have to choose. You may incur additional charges.”&lt;/p&gt;
&lt;p&gt;I’ll not comment on the “so you don’t have to choose” as I’m not sure I have anything polite to say. That additional storage is in Dataverse which could cost $40 per 1GB per month and with all the tables that could easily become a huge expense, even empty tables take up space. All this so we can have a shortcut in Fabric.&lt;/p&gt;
&lt;p&gt;Platform Guardian blog has a great post to walk you through doing this&lt;a class="link" href="https://platformguardian.blog/2023/11/05/creating-the-dataverse-connector-in-fabric/" target="_blank" rel="noopener"
 &gt;https://platformguardian.blog/2023/11/05/creating-the-dataverse-connector-in-fabric/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Copy Job is one of my favourite Fabric artifacts because they are simple to set up. Editing them is foul so I end up re-building them. Its a brilliant low-code solution to copying across data from dataverse and into a lakehouse. Be aware incremental is going to eat capacity so don’t bother with small tables just do a full copy over writing every time.&lt;/p&gt;
&lt;p&gt;I don’t see any benefit using the dataverse connector except you don’t have to write SQL. A simple select statement is not complex I’m sure an AI prompt somewhere will help you out.&lt;/p&gt;</description></item><item><title>Microsoft Fabric – Direct Lake and User Permissions</title><link>https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/</link><pubDate>Fri, 07 Nov 2025 19:40:06 +0000</pubDate><guid>https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/</guid><description>&lt;img src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/cover.png" alt="Featured image of post Microsoft Fabric – Direct Lake and User Permissions" /&gt;&lt;p&gt;Direct Lake is the best way to build a semantic model on data in a Lakehouse or a Warehouse. We can then use Power BI to build reports and possibly even a make a Workspace App to deliver those reports to the business. So what permissions do the business users need to view those reports? This post will explore using Direct Lake and User Permissions to make sure everyone can see data in the reports.&lt;/p&gt;
&lt;h2 id="important"&gt;IMPORTANT
&lt;/h2&gt;&lt;p&gt;This is the simplest method of fixing permissions so someone can view a report using direct lake. If your lakehouse or warehouse contains data they should not have access to this is not the method to use.&lt;/p&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;For this post I have built the following :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Workspace that has a workspace app built and up to date.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Lakehouse_Report connected to a semantic model, Lakehouse_Model, that has a direct lake connection to a lakehouse, Permissions_Demo_Lakehouse&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Warehouse_Report connected to a semantic model, Warehouse_Model, that has a direct lake connection to a lakehouse, Permissions_Demo_Warehouse&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Both the Warehouse and Lakehouse contain one table, Projects with 10 rows of data. Both reports show this in a chart.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Lineage view of the items described above" class="gallery-image" data-flex-basis="630px" data-flex-grow="262" height="259" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I have given one user, Dan, Vistor access to the workspace and I’ve given the Project team security group access to the workspace app.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs showing the permissions as described above." class="gallery-image" data-flex-basis="369px" data-flex-grow="153" height="442" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Both reports work fine for me as the workspace owner. The report is direct lake and user permissions are admin.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="965px" data-flex-grow="402" height="169" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="viewing-reports-as-dan"&gt;Viewing Reports as Dan
&lt;/h2&gt;&lt;p&gt;Viewing the report as Dan is an example of a report that is direct lake and user permission is viewer. Dan can see the warehouse data but he cannot see the lakehouse data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the two reports. Lakehouse report shows an error and no chart, warehouse report shows the chart correctly." class="gallery-image" data-flex-basis="947px" data-flex-grow="394" height="172" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-4.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="viewing-workspace-app-as-sam"&gt;Viewing Workspace App as Sam
&lt;/h2&gt;&lt;p&gt;Viewing the report as Sam, who is a member of the Project team security is an example of a reports that are direct lake and user permission is app only. Sam cannot see either the lakehouse or the warehouse report charts.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots of both reports in the app. Both reports are not showing the chart but are showing an error" class="gallery-image" data-flex-basis="886px" data-flex-grow="369" height="184" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-5.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="permissions"&gt;Permissions
&lt;/h2&gt;&lt;p&gt;Whenever data is not coming through for some but not others it is usually an issue with permissions somewhere. Everyone can see the report, they get the headings. The connection is direct lake into the semantic model we need to look at user permissions where the data lives, the lakehouse and the warehouse.&lt;/p&gt;
&lt;p&gt;Each item in the workspace has permissions. By default permissions are inherited from the workspace. There are two fixes to do. The first is Dan’s access to the lakehouse and the second is project team access to both lakehouse and the warehouse.&lt;/p&gt;
&lt;h2 id="fix-dans-lakehouse-access"&gt;Fix Dan’s Lakehouse Access
&lt;/h2&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="376px" data-flex-grow="157" height="433" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the workspace, click on the three dots on the lakehouse. Then from the menu select Manage permissions. This shows a list of the people with access and the Role which gave them that access. We can see Dan has Read and ViewOutput&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="1191px" data-flex-grow="496" height="137" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Read only gives the user permission to connect to the lakehouse, it does not let them see the data. Neither does ViewOutput. I’d love to find documentation as to what ViewOutput allows but I’ve not found it yet. I will update this post when I do.&lt;/p&gt;
&lt;p&gt;Click on the three dots at the end of permissions and select Add ReadAll. Now when Dan looks at the reports the Lakehouse one will work. Sometimes it takes 10-15 minutes for the permissions to work..&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="706px" data-flex-grow="294" height="231" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-9.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="fix-sams-access-via-the-workspace-app"&gt;Fix Sam’s Access via the Workspace App
&lt;/h2&gt;&lt;p&gt;Sam gains access to the workspace app through being a member of the Project Team security group. The security group is not mentioned in the permissions of the lakehouse or warehouse. If you go look it is listed in the permissions of the semantic model as App.&lt;/p&gt;
&lt;p&gt;In the lakehouse permissions, click on +Add user. In the Grant people access dialog add the user group or people into the box. Decide if you are emailing them and add a message, I’m not emailing anyone an auto generated email! I have not ticked any of the additional permissions. Then click Grant.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Fixing direct lake and user permissions" class="gallery-image" data-flex-basis="260px" data-flex-grow="108" height="627" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-10.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This will give them Read access. Then as we did for Dan, click on the three dots and click Add ReadAll and this.&lt;/p&gt;
&lt;p&gt;Warehouse permissions are slightly different. Dan has Read and ReadData permissions which gives enough access for him to view the report. So we can use the same process as on the lakehouse and duplicate those permissions. Note that in the Grant people access dialog no additional permissions were ticked.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="390px" data-flex-grow="162" height="418" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;And after a few minutes when Sam refreshes the Workspace App they can see the reports both working.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Workspace app that uses Direct lake and user permissions are fixed" class="gallery-image" data-flex-basis="981px" data-flex-grow="409" height="166" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-direct-lake-and-user-permissions/image-13.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="note"&gt;Note!
&lt;/h2&gt;&lt;p&gt;The permissions given do mean that if Sam now has access to run SQL against the Warehouse but not the Lakehouse which is behind the semantic model so any row level security in the model will not apply. They do allow Sam to explore the data in both the semantic models.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;The reason I wrote this blog post was I couldn’t find a resource to show the simple fix of manage permissions. &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-sharing" target="_blank" rel="noopener"
 &gt;Lakehouse sharing and permission management – Microsoft Fabric | Microsoft Learn&lt;/a&gt; is the closest I got.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Giving someone access to the whole lakehouse or warehouse could be dangerous. This post gives the simplest of fixes assuming the report viewer is allowed to see all the data with a report that is direct lake and user permissions are read only in the workspace or app only.&lt;/p&gt;
&lt;p&gt;With new security features now available we can make the permissions fix more complex requirements. Handling Direct and User permissions needs careful consideration and should be discussed as part of your data governance.&lt;/p&gt;
&lt;h2 id="other-posts-that-might-interest"&gt;Other Posts that might Interest
&lt;/h2&gt;&lt;h2 id="microsoft-fabric-quick-guides"&gt;Microsoft Fabric Quick Guides
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-a-lakehouse/" target="_blank" rel="noopener"
 &gt;Create a Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-upload-a-file-and-folder/" target="_blank" rel="noopener"
 &gt;Load CSV file and folder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-table-from-csv-file/" target="_blank" rel="noopener"
 &gt;Create a table from a CSV file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/" target="_blank" rel="noopener"
 &gt;Create a Table with a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/" target="_blank" rel="noopener"
 &gt;Create a Table using a Notebook and Data Wrangler&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exploring the SQL End Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Power BI Report&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Paginated Report&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Use ISINSCOPE to improve a Matrix</title><link>https://hatfullofdata.blog/power-bi-use-isinscope/</link><pubDate>Mon, 22 Sep 2025 09:07:40 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-use-isinscope/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-use-isinscope/cover.png" alt="Featured image of post Power BI – Use ISINSCOPE to improve a Matrix" /&gt;&lt;p&gt;I recently had a request for totals in a Matrix to be shown for some columns and not for other columns. My solution was to use ISINSCOPE in a Matrix to work out which level of the matrix to choose what to return.&lt;/p&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;At an event you sell tickets. So for the Cheese and Wine evening we can see 62 tickets are sold so we expect 62 people. BUT some tickets are for multiple people such as Family Ticket is 2 adults and 3 children so the 55 tickets sold for the Christmas Fayre means very little as a Family ticket is 5 people and a Group ticket is 10. So total tickets for more than one ticket type does not make sense and is misleading.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Matric of Event, Ticket Type, Tickets Sold and Total Sales including a total for Total Tickets." class="gallery-image" data-flex-basis="316px" data-flex-grow="131" height="516" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;So I’d like the Tickets Sold measure to not show a value on rows combining the ticket types, ie the total rows on this matrix.&lt;/p&gt;
&lt;h2 id="determining-the-ticket-type-rows"&gt;Determining the Ticket Type Rows
&lt;/h2&gt;&lt;p&gt;The first step is to determine which rows are the ticket type rows and which rows aren’t. For this we can use the DAX function ISINSCOPE.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="353px" data-flex-grow="147" height="462" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;For demo purposes I created a measure that returns a true or false using the function ISINSCOPE. We can see it returns true on the ticket type lines but not the event or total lines. If we want to show all the layers we could look at all the fields in the matrix in a measure. Make sure you start with the lowest level first, so in my case Ticket Type.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="383px" data-flex-grow="159" height="426" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Scope =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SWITCH (
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; TRUE (),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ISINSCOPE ( Tickets[TicketType] ), &amp;#34;Ticket Type&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ISINSCOPE ( Event[Event Name] ), &amp;#34;Event&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;Total&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;As you can see, using the above measure we can tell which level of the matrix a value is on. So we only need to return total tickets if the ticket type is in scope and we can return nothing on other levels.&lt;/p&gt;
&lt;h2 id="final-measure"&gt;Final Measure
&lt;/h2&gt;&lt;p&gt;We can use a simple if statement based on the ISINSCOPE for Ticket Type. That works really well and the customer were partly happy.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Tickets Sold =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;IF (
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ISINSCOPE ( Tickets[TicketType] ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SUM ( Bookings[Qty] )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Matrix with no total showing for the Total Tickets sold" class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="451" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="next-request"&gt;Next Request
&lt;/h2&gt;&lt;p&gt;Once we showed that could be done they wanted to combine the 2 columns of numbers. The request was to not have a separate Total Sales column but to show the Total Sales value as in the total row for each event and the grand total at the bottom. For this we wrote a new measure called Event Sales.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Event Sales =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;IF (
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ISINSCOPE ( Tickets[TicketType] ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SUM ( Bookings[Qty] ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SUMX ( Bookings, Bookings[Qty] * RELATED ( Tickets[Price] ) )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Matrix showing total sales value in the total row and numbers of tickets on the ticket type rows. All the numbers are formatted 0.00" class="gallery-image" data-flex-basis="275px" data-flex-grow="114" height="538" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image-4.png" width="618"&gt;&lt;/p&gt;
&lt;p&gt;We can see in the matrix above the money value appears in the total rows and the number of tickets in the ticket type rows. But they are all formatted the same so it is not clear what the numbers mean.&lt;/p&gt;
&lt;h2 id="adding-dynamic-formatting"&gt;Adding Dynamic Formatting
&lt;/h2&gt;&lt;p&gt;This is not going to be a full description of dynamic formatting, that needs its own post. For the Event sales measure we select Dynamic formatting. In the formula we use the same pattern as the measure for the two different formats.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Using ISINSCOPE for the dynamic format of the measure" class="gallery-image" data-flex-basis="766px" data-flex-grow="319" height="213" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image-5.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Final matric showing totals with a currency format and ticket totals with a whole number" class="gallery-image" data-flex-basis="282px" data-flex-grow="117" height="542" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-use-isinscope/image-6.png" width="639"&gt;&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Microsoft Learn ISINSCOPE – &lt;a class="link" href="https://learn.microsoft.com/en-us/dax/isinscope-function-dax?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/dax/isinscope-function-dax&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DAX Guide ISINSCOPE – &lt;a class="link" href="https://dax.guide/isinscope/" target="_blank" rel="noopener"
 &gt;https://dax.guide/isinscope/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hat Full of Data Dynamic Formatting – Its coming!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Microsoft Learn Dynamic Formatting – &lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SQLBI – &lt;a class="link" href="https://www.sqlbi.com/articles/introducing-dynamic-format-strings-for-dax-measures/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/introducing-dynamic-format-strings-for-dax-measures/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Adding ISINSCOPE into your repertoire of functions opens up lots of possibilities. For the start of this post it removed a confusing total, in the development of that Matrix it added an extra dimension to a measure. Be careful to not make it too confusing, I know some will dislike the one column having two values in it.&lt;/p&gt;</description></item><item><title>Power BI – Counting Active records easily</title><link>https://hatfullofdata.blog/power-bi-counting-active-records-easily/</link><pubDate>Mon, 15 Sep 2025 16:58:48 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-counting-active-records-easily/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-counting-active-records-easily/cover.png" alt="Featured image of post Power BI – Counting Active records easily" /&gt;&lt;p&gt;Recently in a few Power BI projects and training courses we’ve needed to create a measure for counting active records based on start and end dates for a time period. This has varied from active projects, active employees to active contracts. All of them have had the common feature of start and end dates.&lt;/p&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;&lt;img alt="diagram showing tasks with the active tasks highlighted in blue" class="gallery-image" data-flex-basis="297px" data-flex-grow="124" height="548" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-counting-active-records-easily/image-15.png" width="680"&gt;&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Task&lt;/th&gt;
					&lt;th&gt;Start&lt;/th&gt;
					&lt;th&gt;End&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;A&lt;/td&gt;
					&lt;td&gt;01-May&lt;/td&gt;
					&lt;td&gt;20-May&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;B&lt;/td&gt;
					&lt;td&gt;15-May&lt;/td&gt;
					&lt;td&gt;15-Jun&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;C&lt;/td&gt;
					&lt;td&gt;5-Jun&lt;/td&gt;
					&lt;td&gt;25-Jun&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;D&lt;/td&gt;
					&lt;td&gt;20-Jun&lt;/td&gt;
					&lt;td&gt;20-Jul&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;E&lt;/td&gt;
					&lt;td&gt;10-Jul&lt;/td&gt;
					&lt;td&gt;25-Jul&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;F&lt;/td&gt;
					&lt;td&gt;25-Jun&lt;/td&gt;
					&lt;td&gt;15-Jul&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;We have 6 tasks A-F. We want to know how many tasks are active in June. In the list in table above and shown in the image the 2 that don’t count are task A, that finishes before June starts and task E that starts after June finishes. I have a separate calendar table called Calendar.&lt;/p&gt;
&lt;p&gt;Understanding the logic of the filters needed is important when writing a measure. For a task to be active in a period, the task must finish after the start of the period and the task must start before the period ends.&lt;/p&gt;
&lt;h2 id="dax-code-for-counting-active-records"&gt;DAX Code for counting Active Records
&lt;/h2&gt;&lt;p&gt;In DAX we are going to use CALCULATE function to apply the above filters. _MinDate and _MaxDate give us the start and end of the period.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Active Tasks = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR MinDate = MIN(&amp;#39;Calendar&amp;#39;[Date])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR MaxDate = MAX(&amp;#39;Calendar&amp;#39;[Date])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Result = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; CALCULATE(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; COUNTROWS(Tasks),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Tasks[Finish] &amp;gt;= MinDate,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Tasks[Start] &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;= MaxDate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN Result
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This code does not rely on any relationships between the tasks and calendar tables. If there is a relationship that is altering the calculation a CROSSFILTER function can be used to set the relationship to None.&lt;/p&gt;
&lt;p&gt;It can be used in a chart to show 3 active tasks in May, 4 in June and back to 3 in July.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Chart showing counting Active records by Month" class="gallery-image" data-flex-basis="387px" data-flex-grow="161" height="421" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-counting-active-records-easily/image-16.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This is a simple example of using CALCULATE and creating a useful measure. One I’ve taught a few times and promised to document.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/dax/calculate-function-dax?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Calculate Function on Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/dax/crossfilter-function-dax?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Crossfilter Function on Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;Crossfilter on this blog&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion-on-counting-active-records"&gt;Conclusion on Counting Active Records
&lt;/h2&gt;&lt;p&gt;Yes this is another post on me being lazy to answer a question I end up answering lots. Understanding how you can use CALCULATE and how to work out the right filters for your logic is the crux of understanding quite a bit of DAX. Something I am still learning every day still working on.&lt;/p&gt;</description></item><item><title>Lewis and Laura vs. Notebook and Microsoft Graph: Part 2</title><link>https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/</link><pubDate>Tue, 26 Aug 2025 13:07:20 +0000</pubDate><guid>https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/</guid><description>&lt;img src="https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/cover.png" alt="Featured image of post Lewis and Laura vs. Notebook and Microsoft Graph: Part 2" /&gt;&lt;p&gt;A recent project made me reach out to Lewis Baybutt to scream “Help!, I need help getting with authentication for an Excel file in SharePoint in a Microsoft Fabric Notebook”. Yes all the delights of Excel and SharePoint in one project. So started the battle with understanding authentication, permissions and apparently a Notebook and Microsoft Graph is the way.&lt;/p&gt;
&lt;p&gt;The reason for the project was the original solution was using Gen2 Dataflows and we ran out of capacity. Datameerkat has done a nice summary of comparing Dataflow to Copy Activity to a Notebook, &lt;a class="link" href="https://datameerkat.com/copy-activity-dataflows-gen2-and-notebooks-vs-sharepoint-lists" target="_blank" rel="noopener"
 &gt;https://datameerkat.com/copy-activity-dataflows-gen2-and-notebooks-vs-sharepoint-lists&lt;/a&gt;. Its for lists but the same logic works for files in SharePoint. So for this project we selected the Notebook route.&lt;/p&gt;
&lt;h2 id="final-goal-of-notebook-and-microsoft-graph"&gt;Final Goal of Notebook and Microsoft Graph
&lt;/h2&gt;&lt;p&gt;On a SharePoint site there is an Excel file that contains some data I want to load into a table in a Microsoft Fabric Lakehouse. The Pandas library includes a method called read_excel that can pull the data into a dataframe if it has the file content. And we know how to write a dataframe into table, so the real goal is to get the file content of a file on a SharePoint site.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of a SharePoint Library with a few files and screen shot of the Excel file opened showing a " class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="275" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We save the details of file name etc into variables to use later.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sharepoint_domain = &amp;#34;YOURDOMAIN.sharepoint.com&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;site_name = &amp;#34;FabricDemo&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;library_name = &amp;#34;Documents&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;file_name = &amp;#34;PandaDemo.xlsx&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sheet_name = &amp;#34;Demo 1&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="service-principal-permissions-etc"&gt;Service Principal, Permissions Etc
&lt;/h2&gt;&lt;p&gt;The first part of this series is definitely not my skill set, it involved Power Shell! So we agreed he would write the first part and I would write part 2. So Lewis has covered that topic in Part 1 which can be found here &lt;a class="link" href="https://www.lewisdoes.dev/blog/lewis-and-laura-vs-fabric-notebooks-and-microsoft-graph-part-1/" target="_blank" rel="noopener"
 &gt;https://www.lewisdoes.dev/blog/lewis-and-laura-vs-fabric-notebooks-and-microsoft-graph-part-1/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The credentials created in the post should be stored in Azure Key Vault. I wrote a blog post how to do that and another one how to retrieve it into notebook&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/get-secret-from-azure-key-vault/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/get-secret-from-azure-key-vault/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I created a code block to create three variables, tenant_id, client_id and client_secret. Swap in your TENANT ID etc to make it work for you. The notebookutils library is always loaded in a Microsoft Fabric Notebook.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Authentication details
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tenant_id = &amp;#34;TENANT ID&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;client_id = &amp;#34;CLIENT ID&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Get secret from Key Vault
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_name = &amp;#34;VAULT NAME&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_secret_name = &amp;#34;SECRET NAME&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_url = f&amp;#34;https://{azure_key_vault_name}.vault.azure.net/&amp;#34; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;client_secret = notebookutils.credentials.getSecret(azure_key_vault_url,azure_key_vault_secret_name)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="requests-library"&gt;Requests Library
&lt;/h2&gt;&lt;p&gt;This whole post is lots of HTTP get requests made way easier using the Requests library. Documentation for this library can is here &lt;a class="link" href="https://docs.python-requests.org/en/latest/index.html" target="_blank" rel="noopener"
 &gt;Requests: HTTP for Humans™ — Requests 2.32.5 documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We use two patterns very similar, obviously there is a import requests statement in a previous code block.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;reponse = requests.post(url , data=token_data)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Raise error if request fails
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response.raise_for_status()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;reponse = requests.get(url , headers=headers)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Raise error if request fails
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response.raise_for_status()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="get-access-token"&gt;Get Access Token
&lt;/h2&gt;&lt;p&gt;Before we can use Notebook and Microsoft Graph together we need an access token. For all the requests.get we need headers which includes an access token. So the next task is to get that access token which uses the first pattern from above. If you’ve used the tenant_id, client_id and client_secret variables you can just copy and paste this code into a block&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;token_url = f&amp;#34;https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;token_data = {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;grant_type&amp;#34;: &amp;#34;client_credentials&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;client_id&amp;#34;: client_id,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;client_secret&amp;#34;: client_secret,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;scope&amp;#34;: &amp;#34;https://graph.microsoft.com/.default&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response = requests.post(token_url, data=token_data)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response.raise_for_status() # Raise error if request fails
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;access_token = response.json().get(&amp;#34;access_token&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Print the result
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(&amp;#34; Access Token Received:&amp;#34;, access_token[:50], &amp;#34;...&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;headers = {&amp;#34;Authorization&amp;#34;: f&amp;#34;Bearer {access_token}&amp;#34;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The last step is to put the access token into a JSON object called headers which will be used for the next stages.&lt;/p&gt;
&lt;h2 id="getting-the-site-id-and-drive-id"&gt;Getting the Site ID and Drive ID
&lt;/h2&gt;&lt;p&gt;We need the url to download the file content. The request to get that url is&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://graph.microsoft.com/v1.0/sites/%7bsite_id%7d/drives/%7bdrive_id%7d/root:/%7bfile_name%7d:/content" target="_blank" rel="noopener"
 &gt;https://graph.microsoft.com/v1.0/sites/{site_id}/drives/{drive_id}/root:/{file_name}:/content&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So we need the site_id and the drive_id. Btw drives are document libraries… yeah naming confusion, don’t blame me! We already have the file_name, if its in a folder the name needs to include that.&lt;/p&gt;
&lt;h3 id="site-id"&gt;Site ID
&lt;/h3&gt;&lt;p&gt;Using &lt;a class="link" href="https://graph.microsoft.com/v1.0/sites/%7bsharepoint_domain%7d:/sites/%7bsite_name%7d" target="_blank" rel="noopener"
 &gt;https://graph.microsoft.com/v1.0/sites/{sharepoint_domain}:/sites/{site_name}&lt;/a&gt; with the headers we built earlier in a requests.get we get a json response that includes an id value&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;site_id_url = f&amp;#34;https://graph.microsoft.com/v1.0/sites/{sharepoint_domain}:/sites/{site_name}&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(&amp;#34;Site ID URL:&amp;#34;,site_id_url)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response = requests.get(site_id_url, headers=headers)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response.raise_for_status() # Raise error if request fails
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;display(response.json())
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Produces&lt;/p&gt;
&lt;p&gt;&lt;img alt="The response JSON from getting the site JSON showing it has an id field" class="gallery-image" data-flex-basis="943px" data-flex-grow="393" height="173" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/image-4.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;So we then use the following code to get the site_id and print it for debugging.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;site_id=response.json()[&amp;#39;id&amp;#39;]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(&amp;#34;Site ID:&amp;#34;,site_id[:50], &amp;#34;...&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="drive-id"&gt;Drive ID
&lt;/h3&gt;&lt;p&gt;Using &lt;a class="link" href="https://graph.microsoft.com/v1.0/sites/%7bsite_id%7d/drives?$select=name,id" target="_blank" rel="noopener"
 &gt;https://graph.microsoft.com/v1.0/sites/{site_id}/drives?$select=name,id&lt;/a&gt; will give us a list of the document libraries on the site. A site can have more than one library so we need to handle multiple rows being returned. My choice was to save it into dataframe and then filter that to get the result.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;drive_id_url = f&amp;#34;https://graph.microsoft.com/v1.0/sites/{site_id}/drives?$select=name,id&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response = requests.get(drive_id_url, headers=headers)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response.raise_for_status() # Raise error if request fails
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Convert response json into a dataframe
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;df_drives = spark.createDataFrame(response.json()[&amp;#39;value&amp;#39;])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;display(df_drives)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Filter the dataframe to the specified library and get the id
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;drive_id = df_drives.filter(col(&amp;#34;name&amp;#34;)== library_name).collect()[0][&amp;#34;id&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(&amp;#34;Drive ID:&amp;#34;,drive_id[:25], &amp;#34;...&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That gives this output&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of the drive results showing columns id and name. Followed by a line with Drive ID: then a guid value" class="gallery-image" data-flex-basis="405px" data-flex-grow="169" height="402" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;So now we have the site id and the drive id so now we can get the file content using our Notebook and Microsoft Graph.&lt;/p&gt;
&lt;h2 id="get-the-file-content"&gt;Get the File Content
&lt;/h2&gt;&lt;p&gt;This uses the same pattern as the previous 2 requests, the difference is the path includes /content on the end to indicate we want the content. There is very little we can print out to debug the response as the file contant is binary&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Retrieve the File Content from SharePoint using Graph API
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;file_url = f&amp;#34;https://graph.microsoft.com/v1.0/sites/{site_id}/drives/{drive_id}/root:/{file_name}:/content&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;print(&amp;#34;File URL:&amp;#34;,file_url[:75], &amp;#34;...&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response = requests.get(file_url, headers=headers)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;response.raise_for_status() # Raise error if request fails
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="pandas-and-file-content"&gt;Pandas and File Content
&lt;/h2&gt;&lt;p&gt;Pandas read_excel method wants a file type to work with. Using BytesIO from io library we can create that. Documentation for BytesIO can be found here &lt;a class="link" href="https://docs.python.org/3/library/io.html" target="_blank" rel="noopener"
 &gt;https://docs.python.org/3/library/io.html&lt;/a&gt;. We can then use read_excel from Pandas library to fetch the data from the sheet. I’ve kept it simple, the tricks on handling more complex data in Excel is for another post.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Import methods
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;from io import BytesIO
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;from pandas import read_excel
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Convert response
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;xls = BytesIO(response.content)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Get data from sheet
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;df = read_excel(xls, sheet_name=sheet_name) 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;display(df)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;From the above code we get the following in a panda dataframe ready to save into a table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table pulled from the Excel file using Notebook and Microsoft Graph" class="gallery-image" data-flex-basis="502px" data-flex-grow="209" height="325" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/notebook-and-microsoft-graph-part-2/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="final-notebook"&gt;Final Notebook
&lt;/h2&gt;&lt;p&gt;The complete notebook that could be imported into a Fabric Workspace can be found here &lt;a class="link" href="https://github.com/HatFullOfData/CodeStuff/blob/main/Sample%20Files/Access%20SharePoint%20using%20Microsoft%20Graph.ipynb" target="_blank" rel="noopener"
 &gt;https://github.com/HatFullOfData/CodeStuff/blob/main/Sample%20Files/Access%20SharePoint%20using%20Microsoft%20Graph.ipynb&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Congratulations on getting this far with Notebook and Microsoft Graph. The above looks like hard work when connecting from a Gen2 Dataflow is so much easier. But the saving on capacity usage and the flexibility of a notebook I think gives us more options in the future.&lt;/p&gt;</description></item><item><title>Get Secret from Azure Key Vault in a Microsoft Fabric Notebook</title><link>https://hatfullofdata.blog/get-secret-from-azure-key-vault/</link><pubDate>Thu, 21 Aug 2025 16:33:55 +0000</pubDate><guid>https://hatfullofdata.blog/get-secret-from-azure-key-vault/</guid><description>&lt;img src="https://hatfullofdata.blog/get-secret-from-azure-key-vault/cover.png" alt="Featured image of post Get Secret from Azure Key Vault in a Microsoft Fabric Notebook" /&gt;&lt;p&gt;I’ve recently been working with Notebooks in Microsoft Fabric and have needed to get a credentials information that should be kept secure. The obvious place to store such credentials is Azure Key Vault so now we need to get our secret from there.&lt;/p&gt;
&lt;p&gt;This is a really short post to help me out when I need a fast explanation on projects.&lt;/p&gt;
&lt;h2 id="azure-key-vault-part"&gt;Azure Key Vault Part
&lt;/h2&gt;&lt;p&gt;I’ve previously blogged how to setup a key vault and add a secret – &lt;a class="link" href="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For this post I have a vault called LGB-Secrets and it has a secret called SPConnectorSecret.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of the Key Vault site showing the list of secrets." class="gallery-image" data-flex-basis="421px" data-flex-grow="175" height="387" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/get-secret-from-azure-key-vault/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The vault URI is &lt;a class="link" href="https://lgb-secrets.vault.azure.net/" target="_blank" rel="noopener"
 &gt;https://lgb-secrets.vault.azure.net/&lt;/a&gt; which can be calculated from the vault name.&lt;/p&gt;
&lt;h2 id="python-to-get-secret-from-azure-key-vault"&gt;Python to Get Secret from Azure Key Vault
&lt;/h2&gt;&lt;p&gt;Notebookutils is a built in package for Microsoft Fabric notebooks. It was previously known as MSSparkUtils. It contains plenty of really useful methods to perform tasks with files, environments and credentials. Microsoft’s documentation can be found at :&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#credentials-utilities?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#credentials-utilities&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The method notebookutils.credentials.getSecret requires 2 parameters, vault URI and secret name. This code block looks like this.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_name = &amp;#34;lgb-secrets&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_secret_name = &amp;#34;SPConnectorSecret&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;azure_key_vault_url = f&amp;#34;https://{azure_key_vault_name}.vault.azure.net/&amp;#34; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;client_secret = notebookutils.credentials.getSecret(azure_key_vault_url,azure_key_vault_secret_name)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The account being used to run the notebook will need access to the key vault.&lt;/p&gt;
&lt;h2 id="reacted"&gt;Reacted!
&lt;/h2&gt;&lt;p&gt;The notebook understands that the value you fetched from the key vault should be kept secure. So if you try to print the client_secret it will not show you the result and will show REDACTED instead.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the result of a print client_secret and shows REDACTED" class="gallery-image" data-flex-basis="511px" data-flex-grow="213" height="319" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/get-secret-from-azure-key-vault/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I know this is a very short post, which is a good thing as that means its a simple concept. It is here because I also wanted a short post that contains the code block I want to be able to copy and use easily.&lt;/p&gt;</description></item><item><title>Power BI – Improve a card with SVG</title><link>https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/</link><pubDate>Tue, 29 Jul 2025 11:00:32 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/cover.png" alt="Featured image of post Power BI – Improve a card with SVG" /&gt;&lt;p&gt;The not so new card in Power BI, introduced in 2023, includes some lovely features. The first is the simplest of adding multiple values and having cards laid out evenly in a row in a single visual. The second awesome feature adding an image to a card with SVG.&lt;/p&gt;
&lt;h2 id="starting-point"&gt;Starting Point
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Three cards in a row showing views at 42,559, Views Last YEar at 52,814 and finally Growth at -19.42%." class="gallery-image" data-flex-basis="1406px" data-flex-grow="586" height="116" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/image-19.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This report is visualising web site views per year. In the report there are three measures, Views, Views YTD LY and Growth. In the picture above we can see views have gone down by 19% but its not very visual and takes up three cards. This post is to walk through changing that first card to show an arrow indication growth direction and the %. Something similar to the cards shown below for 2 different time periods. I am no graphic designer but these cards tell the story more effectively in my opinion. See the bottom of the post for the even prettier version.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Two cards with SVG images showing a Red arrow pointing down one the first and a green arrow pointing up on the second." class="gallery-image" data-flex-basis="1095px" data-flex-grow="456" height="149" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/image-20.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="create-the-svg-measure"&gt;Create the SVG Measure
&lt;/h2&gt;&lt;p&gt;Before we can create a card with SVG we need to write the measure that contains the SVG. So here is where we cheat and refer to post I wrote years ago, called &lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/" target="_blank" rel="noopener"
 &gt;SVG in Power BI Part 2 – KPI Shapes&lt;/a&gt;. This uses a measure called Growth and draws either a Green arrow pointing up or a red arrow pointing down. The final code from this blog is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Arrow = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Variables to store arrow paths
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var uparrow = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var downarrow = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Select arrow to use
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var arrow = IF([Growth]&amp;gt;=0,uparrow,downarrow)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Insert arrow into SVG
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var svg =&amp;#34;data:image/svg+xml;utf8,&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; arrow &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN svg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That would create the arrow using the Growth measure, I also want to add text below the arrow. So we increase the viewBox to be 130 tall so line 11 becomes&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To add in the text I make use of another previously written post &lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/" target="_blank" rel="noopener"
 &gt;SVG in Power BI – Part 4 – Adding SVG Text&lt;/a&gt;. I create a text tag that is middle anchored to 50,130 and shows the Growth measure formatted as a percentage.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var growthtext = &amp;#34;&amp;#34; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Growth],&amp;#34;0.00%&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;So the final measure looks like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Arrow = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Variables to store arrow paths
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var uparrow = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var downarrow = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Select arrow to use
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var arrow = IF([Growth]&amp;gt;=0,uparrow,downarrow)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Add text
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var growthtext = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Growth],&amp;#34;0.00%&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Insert arrow into SVG
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var svg =&amp;#34;data:image/svg+xml;utf8,&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; arrow &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; growthtext &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN svg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="measure-data-category"&gt;Measure Data Category
&lt;/h2&gt;&lt;p&gt;As with any SVG measures you need to remember to change the Data category of the measure to Image URL on the measures toolbar or in the Model view properties pane.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Measure tools ribbon with Data Category set to Image URL" class="gallery-image" data-flex-basis="1554px" data-flex-grow="647" height="105" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/image-23.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-svg-to-the-card"&gt;Add SVG to the Card
&lt;/h2&gt;&lt;p&gt;The final part is to add the SVG measure to the card. With the card selected head to the formatting settings. Turn on the Image and then change the Image type to Image URL. The click on the fx button under Image URL to select the SVG measure we created, Arrow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Image settings of the card" class="gallery-image" data-flex-basis="245px" data-flex-grow="102" height="666" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/image-24.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The image is there, even though you can’t see it due to it being too small. Change the size of the image to fit your card. You can change the position, alignment and spacing to fit your card. Do make sure you remember that numbers in a report will change so allow for that.&lt;/p&gt;
&lt;h2 id="accessibility"&gt;Accessibility
&lt;/h2&gt;&lt;p&gt;I know accessibility in published Power BI reports is not great, but it is made even worse by not making use of the Alt text options. So I created a measure Arrow Alt Text that will describe the image. I then click the fx button under Accessibility and use the measure.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Arrow Alt Text = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var ArrowText = IF( [Growth] &amp;gt;= 0 , &amp;#34;Green arrow shape pointing up &amp;#34;, &amp;#34;Red arrow shape pointing down &amp;#34; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var Result = ArrowText &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;with &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Growth],&amp;#34;0.00%&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34; below.&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Return Result
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="even-more-tricks"&gt;Even More Tricks
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=aPrh4sK8CX4" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="403px" data-flex-grow="168" height="404" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/image-21.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Guy in a Cube have a video that does a few more tricks to make it even prettier. Its a high speed video so expect to stop, rewind and understand all the tricks Adam uses. His shadow suggestions are great. Adding his tricks and my svg I changed the card to look like this.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="584px" data-flex-grow="243" height="279" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-improve-a-card-with-svg/image-22.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-new-card" target="_blank" rel="noopener"
 &gt;Microsoft New Card Description&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The new cards are very clever and in the right hands will enhance reports. Adding SVG is a great addition and I know clients who love adding their own graphics. The complexity of understanding which formatting features are available depending on if you pick one series or All is frustrating but that perhaps is a separate post all together.&lt;/p&gt;</description></item><item><title>Power BI – Calculation Groups aren’t scary</title><link>https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/</link><pubDate>Tue, 15 Jul 2025 16:09:30 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/</guid><description>&lt;p&gt;Let’s start by being honest, calculation groups scared me. I had read the brilliant articles, seen the demos and walked away going “hell no!”. Then in a training session a client asks for a visual that really really should be done with a calculation group, so I had to sit down and get my head around them. This post is not to replace any of the superb articles that cover the details, those are referenced below. This post is my notes to remind future me how they work and that they aren’t scary, honest!&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/wdXWaGDiWpw" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/Power-BI-Calculation-Groups-arent-scary-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="scenario"&gt;Scenario
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Table of data with rows labelled Avg Rainfall, Avg Sunshine, Max Temp, Min Temp. Column headings are All Time, This Decade, Last Decade and Decade Change" class="gallery-image" data-flex-basis="763px" data-flex-grow="317" height="167" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-7.png" width="531"&gt;&lt;/p&gt;
&lt;p&gt;The visual requested was similar to this wating to show multiple measures with time intelligence applied. So the example I’ve used is a UK Weather report based of met office data publicly available. The row labels, e.g. Avg Rainfall, are all measures that have been formatted to match the data, e.g. 0 mm for Avg Rainfall. This could probably be done using a complex pile of measures but the technical debt that creates goes against even the minimalist best practice policies.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Calendar table with Date, Decade and Decade Offset columns" class="gallery-image" data-flex-basis="811px" data-flex-grow="338" height="201" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The model includes a calendar that includes a decade offset column. So if we were going to calculate the Avg Rainfall for this decade and last decade the DAX would be&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This Decade Avg Rainfall = CALCULATE( [Avg Rainfall] , &amp;#39;Calendar&amp;#39;[Decade Offset] = 0 )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Last Decade Avg Rainfall = CALCULATE( [Avg Rainfall] , &amp;#39;Calendar&amp;#39;[Decade Offset] = -1 )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="create-a-calculation-group"&gt;Create a Calculation Group
&lt;/h2&gt;&lt;p&gt;With measures created and the calendar table prepared we are now ready to create the calculation group. In the report go to the Model View. Now on the Home ribbon there will be Calculation group button. Click this to start the process, the first step will probably be a warning that this will turn on the “Discourage Implicit measures” option for this model. If you are following best practices this should not be an issue.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Calculation group button on the ribbon, the warning message this will discourage implicit measures and then the calculation group shown in the model pane and on the model diagram" class="gallery-image" data-flex-basis="270px" data-flex-grow="112" height="604" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-9.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then on the model diagram and in the model pane on the right hand side you will see a Calculation Group has been added, with one Calculation item. Double clicking on the name of the Calculation group in the model pane will allow you to rename the calculation group, e.g, Time Intelligence. This would be good practice.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Calculation group in the model pane renamed to Time Intelligence" class="gallery-image" data-flex-basis="372px" data-flex-grow="155" height="322" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-10.png" width="500"&gt;&lt;/p&gt;
&lt;h2 id="add-calculation-items"&gt;Add Calculation Items
&lt;/h2&gt;&lt;p&gt;Calculation items are the different calculations you want to include in the group. For this example I want This Decade, Last Decade and % Change. Right click on the calculation group and from the menu select New calculation item. Then a formula appears similar to when you create a column or measure. Once you add in your formula and press enter it will appear under Calculation items.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the semantic model, the right click menu and a screen grab of the calculation item DAX." class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I renamed the original calculation item to All Time by double clicking on it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This Decade = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;CALCULATE( 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SELECTEDMEASURE() , 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#39;Calendar&amp;#39;[Decade Offset] = 0 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="add-calculation-group-to-a-matrix"&gt;Add Calculation Group to a Matrix
&lt;/h2&gt;&lt;p&gt;Now we have created a calculation group we can start to create the matrix. Add a matrix to the report and add the measures. The measure names will appear as column headings. You can switch these to row headings in the visual formatting by looking under Values and then Options and turning on Switch values to rows.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Matrix visual with the values pane expanded to show the measures added and the format pane to show where the Values Options section is." class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="390" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-12.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After you have added the measures and switched the values to rows you can add the calculation group to the Columns area in the visual. All the calculation items appear as columns.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="394px" data-flex-grow="164" height="414" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="formatting-the-calculations-items"&gt;Formatting the calculations items
&lt;/h2&gt;&lt;p&gt;The numbers shown in the previous diagram are formatted the same as the measure formatting, e.g. Max Temp is 0.0 ºC format. This is correct for all the measures except the % Change, which should be formatted 0.00%.&lt;/p&gt;
&lt;p&gt;Select the calculation item that needs different formatting. In the properties panel turn on Dynamic format string. Then in the Format string box enter in the format as a string, e.g. “0.00%”. You can edit in the formula bar which is slightly easier.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Properties pane showing the Dynamic format string toggle and format string. Also showing the changes in the visual." class="gallery-image" data-flex-basis="253px" data-flex-grow="105" height="643" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-15.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="sorting-and-selecting-columns"&gt;Sorting and Selecting Columns
&lt;/h2&gt;&lt;p&gt;The Calculation items are sorted alphabetically by default. If you change the order of one calculation item it will fix the order of all the items. So I move the % Change to the end&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="258px" data-flex-grow="107" height="632" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-16.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Also by default all columns are shown. The columns can be selected using the filters panel. In the filters panel, expand Calculation group column to show all the calculation item names. Un-select the columns you don’t want.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Filter panel with only three column names with a tick and the result table" class="gallery-image" data-flex-basis="519px" data-flex-grow="216" height="314" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-calculation-groups-arent-scary/image-18.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;As with anything DAX related my first port of call is SQLBI and of course Microsoft and recent announcements.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/articles/introducing-calculation-groups/" target="_blank" rel="noopener"
 &gt;SQLBI – Introducing Calculation Groups&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;Microsoft – Create Calculation Groups&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PBIX file used in this post&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion-on-calculation-groups"&gt;Conclusion on Calculation Groups
&lt;/h2&gt;&lt;p&gt;Calculation groups are a very powerful addition to creating Power BI models that are not bloated with 100s of measures. I really hope they will be expanded to allow for dynamic names and some tricks to do conditional formatting.&lt;/p&gt;</description></item><item><title>Paginated Reports – Power Query as a Source</title><link>https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/</link><pubDate>Tue, 08 Jul 2025 16:01:05 +0000</pubDate><guid>https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/</guid><description>&lt;img src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/cover.png" alt="Featured image of post Paginated Reports – Power Query as a Source" /&gt;&lt;p&gt;In March 2024 Microsoft added Power Query as a source for Paginated Reports. This means a paginated report can connect to any data source that Power Query can connect to. This post walks through the process with a few gotchas to be aware of.&lt;/p&gt;
&lt;h2 id="paginated-reports-have-had-some-love"&gt;Paginated Reports have had some Love
&lt;/h2&gt;&lt;p&gt;This post is part of the series covering my session titled Paginated Reports have had some Love. The resources for this series can be found at &lt;a class="link" href="https://github.com/HatFullOfData/Sessions/tree/main/Paginated-Reports-have-had-some-love" target="_blank" rel="noopener"
 &gt;https://github.com/HatFullOfData/Sessions/tree/main/Paginated-Reports-have-had-some-love&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/" target="_blank" rel="noopener"
 &gt;Power Query as a Source&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a report online&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dynamic Subscribing&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="get-data"&gt;Get Data
&lt;/h2&gt;&lt;p&gt;As with most reporting the first task is connect to the data using Power Query as a source. Inside a report in Report Builder, click on the data ribbon. Click on Get data to launch the Choose data source dialog. From here you can search and find lots of different data sources. For this post we are going to use an Excel workbook, so click on that.&lt;/p&gt;
&lt;p&gt;When the connection settings dialog opens enter the File path or URL for the Excel file. There is a button to browse OneDrive, bad idea in my opinion but that is a different post! Please note you need to select the correct Authentication type. I’ve used Anonymous as my file is public on GitHub, you will need Organization Account for OneDrive or SharePoint.&lt;/p&gt;
&lt;p&gt;Then click Next.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Get data button and the choose data source dialog and then the connection settings to start using Power Query as a source" class="gallery-image" data-flex-basis="264px" data-flex-grow="110" height="618" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next dialog, Choose Data, asks you to select the tables or sheets. Once you have ticked at least one you can then click Transform data to move to the Power Query window.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Choose data dialog step in setting up Power Query as a source" class="gallery-image" data-flex-basis="466px" data-flex-grow="194" height="350" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="power-query-editor"&gt;Power Query Editor
&lt;/h2&gt;&lt;p&gt;When the Power Query window opens you can add steps as per normal such as choosing columns etc. After you add all the transformations you need, click Create to add it to the report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power Query window" class="gallery-image" data-flex-basis="344px" data-flex-grow="143" height="474" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="power-query-as-a-source-in-explorer"&gt;Power Query as a source in Explorer
&lt;/h2&gt;&lt;p&gt;When the data loads into the report it comes in 2 parts. Under data sources is Power Query and in datasets are the individual queries. Unlike other data sources such as a database each dataset will be a brand new query.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="490px" data-flex-grow="204" height="333" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="editing-the-query"&gt;Editing the Query
&lt;/h2&gt;&lt;p&gt;When you need to edit the query, right click on the query and select Edit Mashup. It will always request you configure the connection. No Idea why but clicking the Configure Connection fixes the issue.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Configure connection error on a yellow background" class="gallery-image" data-flex-basis="886px" data-flex-grow="369" height="184" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/image-4.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="a-few-gotchas"&gt;A few Gotchas
&lt;/h2&gt;&lt;h3 id="multiple-queries"&gt;Multiple Queries
&lt;/h3&gt;&lt;p&gt;Each query can only return a single table. So when you have multiple queries, which one does it return? It returns the last one in the list of queries. It has nothing to do with marking a query for loading or not loading.&lt;/p&gt;
&lt;h3 id="refresh-or-not"&gt;Refresh or not?
&lt;/h3&gt;&lt;p&gt;When you publish the report there is no semantic model. There is just a report. So every time the report is opened the Power Query executes. So lets keep those queries tidy and efficient.&lt;/p&gt;
&lt;h3 id="parameters"&gt;Parameters
&lt;/h3&gt;&lt;p&gt;Parameters make Paginated Reports reusable and a powerful tool for the analyst. Power Query parameters though do not connect to the parameters in Report Builder. The Dataset properties show the M code, kind of. Its not editable so we can’t embed the Report Builder parameters. The only way to perform a filter is using the Filters in dataset properties which has the disadvantage that it filters after pulling all the data in.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Dataset properties" class="gallery-image" data-flex-basis="278px" data-flex-grow="116" height="586" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-reports-power-query-as-a-source/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="power-query-as-a-source-conclusion"&gt;Power Query as a Source Conclusion
&lt;/h2&gt;&lt;p&gt;I love Power Query, second to SQL, every data handler in the Microsoft stack should know it. But I don’t believe it brings any benefit putting it in report builder when I can do more from a semantic model. The gotchas aren’t a real problem on their own but they add up. So my recommendation would be to build the semantic model in Power BI desktop or in Microsoft Fabric and connect to that. That is a separate blog post, link up above.&lt;/p&gt;</description></item><item><title>Power BI – Create a calendar using TMDL</title><link>https://hatfullofdata.blog/tmdl-create-a-calendar/</link><pubDate>Wed, 11 Jun 2025 15:18:18 +0000</pubDate><guid>https://hatfullofdata.blog/tmdl-create-a-calendar/</guid><description>&lt;p&gt;TMDL is short for Tabular Model Definition Language in Power BI desktop. It allows us to script definitions and changes to a Power BI model. In this post I use TMDL to quickly create a calendar for a report that includes column options such as sort by, formatting and hidden columns.&lt;/p&gt;
&lt;h2 id="calendar-table"&gt;Calendar Table
&lt;/h2&gt;&lt;p&gt;Nearly every report I create includes a calendar table. Every Power BI introduction course I run I send delegates to SQLBI site to grab the code for a simple calendar. Using a few example exercises I explain column sorting for the months, hiding the columns used for sorting and formatting the date columns. Tasks we all do every new report.&lt;/p&gt;
&lt;p&gt;Just to be clear the code I usually use comes from one of these links, in this post I’ve used the second one.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/articles/using-generate-and-row-instead-of-addcolumns-in-dax/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/using-generate-and-row-instead-of-addcolumns-in-dax/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="turning-on-tmdl-view"&gt;Turning on TMDL View
&lt;/h2&gt;&lt;p&gt;At the point of publishing this post (Jun 2025) TMDL view is still in preview so it need be turned on. From the File tab select, Options and settings and then Options to open the dialog. Then under Preview features put a tick next to TMDL view. This will add a new button on the top left views menu.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Turning on TMDL view" class="gallery-image" data-flex-basis="299px" data-flex-grow="124" height="545" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/tmdl-create-a-calendar/image-12.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="tmdl-view"&gt;TMDL View
&lt;/h2&gt;&lt;p&gt;This view allows you to define tables, columns, relationships and measures. You can drag a Power BI item into the view from the data pane to see the definition. Bu this post is not to teach TMDL but to show one use of it. More information can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tmdl-view?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tmdl-view&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="410px" data-flex-grow="170" height="398" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/tmdl-create-a-calendar/image-13.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-the-calendar"&gt;Adding the Calendar
&lt;/h2&gt;&lt;p&gt;Another use is to use code to create a calendar table. I created the original code by creating calendar in a report and making all the adjustments I would usually do and then dragged the calendar table onto the TMDL window. So now the code includes the adjustments mentioned at the start of this post. Then I go to a report without a calendar and paste in the code below in the TMDL view. Then click Apply. The table will appear in the Data pane but possibly with red exclamation mark. There also might be a message stating a calculated table needs refreshing. If that appears click the Refresh now button that appears.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="449px" data-flex-grow="187" height="363" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/tmdl-create-a-calendar/image-14.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;span class="lnt"&gt;55
&lt;/span&gt;&lt;span class="lnt"&gt;56
&lt;/span&gt;&lt;span class="lnt"&gt;57
&lt;/span&gt;&lt;span class="lnt"&gt;58
&lt;/span&gt;&lt;span class="lnt"&gt;59
&lt;/span&gt;&lt;span class="lnt"&gt;60
&lt;/span&gt;&lt;span class="lnt"&gt;61
&lt;/span&gt;&lt;span class="lnt"&gt;62
&lt;/span&gt;&lt;span class="lnt"&gt;63
&lt;/span&gt;&lt;span class="lnt"&gt;64
&lt;/span&gt;&lt;span class="lnt"&gt;65
&lt;/span&gt;&lt;span class="lnt"&gt;66
&lt;/span&gt;&lt;span class="lnt"&gt;67
&lt;/span&gt;&lt;span class="lnt"&gt;68
&lt;/span&gt;&lt;span class="lnt"&gt;69
&lt;/span&gt;&lt;span class="lnt"&gt;70
&lt;/span&gt;&lt;span class="lnt"&gt;71
&lt;/span&gt;&lt;span class="lnt"&gt;72
&lt;/span&gt;&lt;span class="lnt"&gt;73
&lt;/span&gt;&lt;span class="lnt"&gt;74
&lt;/span&gt;&lt;span class="lnt"&gt;75
&lt;/span&gt;&lt;span class="lnt"&gt;76
&lt;/span&gt;&lt;span class="lnt"&gt;77
&lt;/span&gt;&lt;span class="lnt"&gt;78
&lt;/span&gt;&lt;span class="lnt"&gt;79
&lt;/span&gt;&lt;span class="lnt"&gt;80
&lt;/span&gt;&lt;span class="lnt"&gt;81
&lt;/span&gt;&lt;span class="lnt"&gt;82
&lt;/span&gt;&lt;span class="lnt"&gt;83
&lt;/span&gt;&lt;span class="lnt"&gt;84
&lt;/span&gt;&lt;span class="lnt"&gt;85
&lt;/span&gt;&lt;span class="lnt"&gt;86
&lt;/span&gt;&lt;span class="lnt"&gt;87
&lt;/span&gt;&lt;span class="lnt"&gt;88
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;createOrReplace
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	table Calendar
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		lineageTag: a8e10f84-8296-4cf3-bda3-412811e34790
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		column Date
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			formatString: General Date
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			lineageTag: b0b99eff-688f-4526-81d2-8afc25541413
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			summarizeBy: none
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isNameInferred
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sourceColumn: [Date]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			annotation SummarizationSetBy = Automatic
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		column Year
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			formatString: 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			lineageTag: 4ad002b0-e801-4457-865d-8766808bacb9
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			summarizeBy: none
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isNameInferred
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sourceColumn: [Year]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			annotation SummarizationSetBy = User
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		column &amp;#39;Month Number&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isHidden
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			formatString: 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			lineageTag: e14ae615-2ba5-4e4a-ad44-ff0fcb4fb3ed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			summarizeBy: none
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isNameInferred
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sourceColumn: [Month Number]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			annotation SummarizationSetBy = User
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		column Month
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			lineageTag: e9c8caaf-f192-4478-86bd-d811116a5ac1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			summarizeBy: none
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isNameInferred
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sourceColumn: [Month]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sortByColumn: &amp;#39;Month Number&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			annotation SummarizationSetBy = Automatic
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		column &amp;#39;Year Month Number&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isHidden
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			formatString: 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			lineageTag: 9c81640a-3399-4b97-87dd-884390419cb4
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			summarizeBy: none
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isNameInferred
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sourceColumn: [Year Month Number]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			annotation SummarizationSetBy = User
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		column &amp;#39;Year Month&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			lineageTag: a2d59320-d499-43cf-a365-44c1f33b8ed4
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			summarizeBy: none
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			isNameInferred
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sourceColumn: [Year Month]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			sortByColumn: &amp;#39;Year Month Number&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			annotation SummarizationSetBy = Automatic
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		partition Calendar = calculated
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			mode: import
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			source =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					VAR MinYear = 2025
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					VAR MaxYear = 2025
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					VAR BaseCalendar =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 CALENDAR ( DATE ( MinYear, 1, 1 ), DATE ( MaxYear, 12, 31 ) )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 GENERATE (
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 BaseCalendar,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 VAR BaseDate = [Date]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 VAR YearDate = YEAR ( BaseDate )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 VAR MonthNumber = MONTH ( BaseDate )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 VAR MonthName = FORMAT ( BaseDate, &amp;#34;mmmm&amp;#34; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 VAR YearMonthName = FORMAT ( BaseDate, &amp;#34;mmm yy&amp;#34; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 VAR YearMonthNumber = YearDate * 12 + MonthNumber - 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 RETURN ROW (
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 &amp;#34;Year&amp;#34;, YearDate,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 &amp;#34;Month Number&amp;#34;, MonthNumber,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 &amp;#34;Month&amp;#34;, MonthName,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 &amp;#34;Year Month Number&amp;#34;, YearMonthNumber,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 &amp;#34;Year Month&amp;#34;, YearMonthName
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;					 )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		annotation PBI_Id = 0bd3b6910f2844c8b21afe01ffb36109
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The report now has a calendar table matching your original calendar.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Being able to use TMDL will allow me to build a library of code snippets to quickly build the report elements I regularly build. This is an exciting extra tool for the toolbox. I have already started a github library of snippets I think will be useful. Not ready to make that public yet but I will.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Microsoft Fabric – Create a Data Pipeline with Parameters</title><link>https://hatfullofdata.blog/data-pipeline-with-parameters/</link><pubDate>Thu, 05 Jun 2025 10:26:00 +0000</pubDate><guid>https://hatfullofdata.blog/data-pipeline-with-parameters/</guid><description>&lt;p&gt;One of the skills of creating good solutions on any platform is building reusable modules. For a part to be reusable we reduce the hard coding and pass in parameters. This is true for data pipelines. So this post post covers creating a data pipeline with parameters.&lt;/p&gt;
&lt;h2 id="initial-scenario"&gt;Initial Scenario
&lt;/h2&gt;&lt;p&gt;In order to demonstrate how to create a data pipeline with parameters we need a simple data pipeline as a demo. For this post we are going to use the Star Wars api called SWAPI. The details of the api can be found at &lt;a class="link" href="https://swapi.info/" target="_blank" rel="noopener"
 &gt;https://swapi.info/&lt;/a&gt;. Its a very simple api that allows anonymous connections and returns data in a JSON format.&lt;/p&gt;
&lt;p&gt;In our pipeline we add a copy data activity. For the Source, the connection is a http connection to &lt;a class="link" href="https://swapi.info/api/" target="_blank" rel="noopener"
 &gt;https://swapi.info/api/&lt;/a&gt; and the relative URL is the table name, in this case films. And the file format is JSON.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Filling in the source details of the copy data activity" class="gallery-image" data-flex-basis="850px" data-flex-grow="354" height="192" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;For the destination the connection is to a Lakehouse. The Root folder is files with the file path being the table name + .json so in this case films.json. To match the source the file format is JSON.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Filling in the destination details of the copy data activity" class="gallery-image" data-flex-basis="747px" data-flex-grow="311" height="218" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-1.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;The issue with the above is the “films” is hard coded. If this pipeline is going to be reusable for other tables from this api we need to move the “films” into a parameter.&lt;/p&gt;
&lt;h2 id="adding-parameters-to-the-data-pipeline"&gt;Adding Parameters to the Data Pipeline
&lt;/h2&gt;&lt;p&gt;In the data pipeline click on the grey background around the activities to make sure no activity is selected. In the bottom panel you should now see options including Parameters. Click on the + New to add a parameter. Then add a name, select a type and give a default value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="panel to create Data Pipeline with Parameters" class="gallery-image" data-flex-basis="510px" data-flex-grow="212" height="319" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-2.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;Multiple parameters can be added. When the data pipeline is run the parameters can be updated. You now have a data pipeline with parameters you just need to use them in activities.&lt;/p&gt;
&lt;h2 id="using-parameters-in-activities"&gt;Using Parameters in Activities
&lt;/h2&gt;&lt;p&gt;We now need to edit the copy data activity to use the TableName parameter rather than the hard coded films. Edit the copy data action and on the source tab clear the Relative URL value. Click on the Add dynamic content or Alt+Shift+D. Then in the panel, under Parameters click the parameter, in this case TableName. This puts the formula in the expression builder. Then click OK to put the expression back into the Relative URL.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Using the parameter value in the Relative URL box" class="gallery-image" data-flex-basis="471px" data-flex-grow="196" height="346" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-5.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The above example was using the parameter straight. For the file name in the destination we need to concatenate “.json” onto the table name. In the expression builder Functions such as concat can be found in the Functions tab and in the right category group.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Selecting a function from the Functions list in the expression builder" class="gallery-image" data-flex-basis="169px" data-flex-grow="70" height="963" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If you know the function name that you want to use there is intellisense and typing in “@conc” will give you a list of matching functions to use.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="549px" data-flex-grow="228" height="297" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Clicking OK will add the expression to the filename box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Destination details with an expression in the File Path" class="gallery-image" data-flex-basis="766px" data-flex-grow="319" height="213" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-9.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="testing-the-data-pipeline-with-parameters"&gt;Testing the Data Pipeline with Parameters
&lt;/h2&gt;&lt;p&gt;When the pipeline is run manually a panel appears prompting for the parameter values. Enter in the values and click OK. When the pipeline completes the run successfully we can see in the lakehouse the new file has been created.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="725px" data-flex-grow="302" height="225" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/data-pipeline-with-parameters/image-10.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I first learnt best programming techniques over 30 years ago. It included concepts I still use and teach today. This is one of them. Of course the pipeline could be more complex, include more parameters and more activities but the concept is still the same, make things reusable by creating data pipeline with parameters.&lt;/p&gt;</description></item><item><title>First refresh it broke!</title><link>https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/</link><pubDate>Mon, 12 May 2025 15:57:47 +0000</pubDate><guid>https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/</guid><description>&lt;img src="https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/cover.png" alt="Featured image of post First refresh it broke!" /&gt;&lt;p&gt;I set up my dataflow and it was working great. Then it broke on the refresh. Here is how I fixed it.&lt;/p&gt;
&lt;h2 id="sharepoint-and-microsoft-fabric"&gt;SharePoint and Microsoft Fabric
&lt;/h2&gt;&lt;p&gt;SharePoint is no database but we keep putting data there so here are my findings and notes from working with SharePoint libraries and lists in Microsoft Fabric.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/" target="_blank" rel="noopener"
 &gt;Ingest a SharePoint folder of Excel Files&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/" target="_blank" rel="noopener"
 &gt;Fixing the broken query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="previously"&gt;Previously
&lt;/h2&gt;&lt;p&gt;In the previous post we ingested a SharePoint folder into a table in a Lakehouse. That is a well known process and nothing new except for one thing. I split the process into two stages, firstly the FullFileList which contained the list of files and the binary content of the files and then a separate query to combine data from those files. Power Query created Helper queries to perform the combining. Then it broke.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="1371px" data-flex-grow="571" height="119" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/image-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="it-broke"&gt;It Broke
&lt;/h2&gt;&lt;p&gt;It all appears to work fine. Then I try a refresh and it fails. On going back to look at the dataflow I see that there are 2 extra steps in FullFileList that have been added by Microsoft Fabric.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Query steps from the FullFileList Query showing the steps the made it broke" class="gallery-image" data-flex-basis="499px" data-flex-grow="207" height="327" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/image-15.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = SharePoint.Files(&amp;#34;https://lgb123.sharepoint.com/sites/FabricDemo/&amp;#34;, [ApiVersion = 15]),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Filtered rows&amp;#34; = Table.SelectRows(Source, each [Folder Path] = &amp;#34;https://lgb123.sharepoint.com/sites/FabricDemo/Budgets/&amp;#34;),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;From Value&amp;#34; = Table.FromValue(#&amp;#34;Filtered rows&amp;#34;),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Remove Columns&amp;#34; = Table.RemoveColumns(#&amp;#34;From Value&amp;#34;, Table.ColumnsOfType(#&amp;#34;From Value&amp;#34;, {type table, type record, type list, type nullable binary, type binary, type function}))
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Remove Columns&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The last step Remove Columns, removes all columns of type table, record, list, binary or function. So this removes the Content column that is binary and therefore the queries doing the combine of the Content column all fail. Hence it broke.&lt;/p&gt;
&lt;h2 id="it-broke-in-the-staging"&gt;It Broke in the Staging
&lt;/h2&gt;&lt;p&gt;To improve performance and reliability, Dataflow Gen2 uses staging items to store intermediate data during data transformation&lt;/p&gt;
&lt;p&gt;The above quote is from &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/data-in-staging-artifacts?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-factory/data-in-staging-artifacts&lt;/a&gt; It stores the intermediate queries, so FullFileList would have been stored as a table in the staginglakehouse or stagingwarehouse. So Fabric is adding the step to remove the binary column so staging can work.&lt;/p&gt;
&lt;h2 id="turn-off-staging"&gt;Turn Off Staging
&lt;/h2&gt;&lt;p&gt;When I right click on the FullFileList query in the query list the menu includes Enable Staging, by default it is turned on, indicated with a tick. So I click on Enable staging to remove the tick and turn it off. I publish the dataflow and wait. Yes! the refresh works, I test it multiple times.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Turning off enable staging" class="gallery-image" data-flex-basis="232px" data-flex-grow="96" height="623" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/image-16.png" width="603"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I am curious as to how turning off staging will impact the dataflow. So I will be keeping an eye on this one. But this appears to be the fix we need to get it working again for now. I will do my enquiries and retests to see if this is still needed.&lt;/p&gt;</description></item><item><title>SharePoint Folder into Microsoft Fabric</title><link>https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/</link><pubDate>Fri, 09 May 2025 17:08:15 +0000</pubDate><guid>https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/</guid><description>&lt;img src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/cover.png" alt="Featured image of post SharePoint Folder into Microsoft Fabric" /&gt;&lt;p&gt;SharePoint folder has been a connector into Power Query for Excel, Power BI Desktop and dataflows for quite a while. This post is to cover the basics before I write another post to explain a more complex scenario. This post will use GEN2 Dataflows in Microsoft Fabric. Power Query can take files on a SharePoint site and from a selected sheet, table or named range append the contents to one big table. This post explains what you should be aware of when doing this.&lt;/p&gt;
&lt;h2 id="sharepoint-and-microsoft-fabric"&gt;SharePoint and Microsoft Fabric
&lt;/h2&gt;&lt;p&gt;SharePoint is no database but we keep putting data there so here are my findings and notes from working with SharePoint libraries and lists in Microsoft Fabric.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/" target="_blank" rel="noopener"
 &gt;Ingest a SharePoint folder of Excel Files&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/first-refresh-it-broke-laurabrokeit/" target="_blank" rel="noopener"
 &gt;Fixing the broken query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sharepoint-library"&gt;SharePoint Library
&lt;/h2&gt;&lt;p&gt;I have a SharePoint library on a site called Budgets. It contains 3 files which are all the same format, 2 tabs, 1 table and 2 named regions.&lt;/p&gt;
&lt;p&gt;&lt;img alt="SharePoint library containing 3 files." class="gallery-image" data-flex-basis="688px" data-flex-grow="286" height="237" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The URL to the library is &lt;a class="link" href="https://lgb123.sharepoint.com/sites/FabricDemo/Budgets/Forms/AllItems.aspx" target="_blank" rel="noopener"
 &gt;https://lgb123.sharepoint.com/sites/FabricDemo/Budgets/Forms/AllItems.aspx&lt;/a&gt; . From this I can work out the URL to the SharePoint site is &lt;a class="link" href="https://lgb123.sharepoint.com/sites/FabricDemo/Budgets/" target="_blank" rel="noopener"
 &gt;https://lgb123.sharepoint.com/sites/FabricDemo/Budgets/&lt;/a&gt; You can always test it by making sure the site url takes you to the front page.&lt;/p&gt;
&lt;h2 id="connecting-to-sharepoint-folder"&gt;Connecting to SharePoint Folder
&lt;/h2&gt;&lt;p&gt;In a GEN2 Dataflow, from the Home ribbon select Get Data and then more. If SharePoint folder isn’t showing in the dialog that appears, search for SharePoint. Then select SharePoint folder. Then enter in your site URL. Please note the full library url will not work.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Setting up the SharePoint Folder connector" class="gallery-image" data-flex-basis="494px" data-flex-grow="206" height="330" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If this is the first time you’ve connected to this SharePoint site you will need to set up the connection. All you need to do is change the Authentication kind to Organizational account and make sure you are signed in. Click Next to move onto the Preview folder data. If you have more than one library or folders it will show too many files, don’t worry we will fix this.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Preview folder data dialog showing files from multiple folders" class="gallery-image" data-flex-basis="600px" data-flex-grow="250" height="272" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click Create, rather than Combine so we can control which files get combined.&lt;/p&gt;
&lt;h2 id="filtering-to-the-right-sharepoint-folder"&gt;Filtering to the right SharePoint Folder
&lt;/h2&gt;&lt;p&gt;In my example I have multiple SharePoint libraries in the same site, so the initial list returned contains too many files. There is a column called Folder Path. I find a row that contains the value I want, right click on the value. Then select Text filters – Equals. This will add a filter a step to the query to filter to only files in that path.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding a text filter to the Folder Path column." class="gallery-image" data-flex-basis="322px" data-flex-grow="134" height="506" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Even if your current site only has one document library so currently this step is not required, I would add it anyway. Then when anyone adds files a new library it will not break your query.&lt;/p&gt;
&lt;h2 id="combining-the-files"&gt;Combining the Files
&lt;/h2&gt;&lt;p&gt;In order to make future additions to these queries easier and to reduce repeated work happening I would rename the query so far to FullFileList or similar and the right click on the query and select Reference. Rename the new query to something suitable, in my case it was Budget. The diagram will now show the two queries connected.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Creating a " class="gallery-image" data-flex-basis="820px" data-flex-grow="341" height="199" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-9.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next stage is to do the combining. Make sure the Content column has a data type of Binary. Then click the button in the top corner of the Content column to start the file combination. After a few seconds the Combine Files will appear requesting you to select which sheet, table or named range you are combining.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the button in the Content for combining, the combine dialog and the resulted combined data" class="gallery-image" data-flex-basis="584px" data-flex-grow="243" height="279" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you click Combine it will create the Helper queries and related queries and will combine the files. You then will have a query with the first column Source.Name and the rest the data from the selected item.&lt;/p&gt;
&lt;h2 id="adding-a-destination"&gt;Adding a Destination
&lt;/h2&gt;&lt;p&gt;There might be other transformation steps you need to add before your data is ready. I’ve added an unpivot to my data, but that would a complete post on its own. Finally we get to add a destination to save the data to. If you are going to a Lakehouse, Warehouse or Database you should be aware of option available to you.&lt;/p&gt;
&lt;p&gt;The first option is if you are saving to an existing table or creating a new table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Choosing a destination target to either a New or Existing table" class="gallery-image" data-flex-basis="390px" data-flex-grow="162" height="418" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-12.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you click next the second option is available. Turning off Use automatic settings will give you the options. Is the update an append or a replace? Is the schema dynamic or fixed, ie if your query adds a new column what happens? I’ve picked replace, the default option but as the SharePoint folder grows I might look to more clever file filters so that only new data is selected and therefore can be appended.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing options for append or replace" class="gallery-image" data-flex-basis="558px" data-flex-grow="232" height="292" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/sharepoint-folder-into-microsoft-fabric/image-13.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Uploading multiple Excel files will always be a requirement. So its worth knowing what Power Query can do for us in a dataflow to do that. There are probably more capacity efficient methods which need exploring.&lt;/p&gt;</description></item><item><title>VBA – Using Dictionaries to improve searching</title><link>https://hatfullofdata.blog/vba-using-dictionaries-to-improve-searching/</link><pubDate>Sat, 08 Mar 2025 20:41:16 +0000</pubDate><guid>https://hatfullofdata.blog/vba-using-dictionaries-to-improve-searching/</guid><description>&lt;p&gt;In VBA programming, dictionaries are invaluable tools that allow you to store key-value pairs efficiently. Checking a list of values to see if it contains a value is a regular requirement in many projects. The obvious solution in VBA is the values in an array and loop through till you find or don’t find the value. On a recent project, I was reminded that another solution is to use dictionaries, which have the exist method that quickly returns a true or false.&lt;/p&gt;
&lt;h2 id="vba-project-references"&gt;VBA Project References
&lt;/h2&gt;&lt;p&gt;Dictionaries are part of the Microsoft Scripting Runtime library which is not loaded by default. Within VBA in your Office app, in the Tools menu select References. From the list of available references tick Microsoft Scripting Runtime.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding Microsoft Scripting Runtime library so you can use dictionaries" class="gallery-image" data-flex-basis="293px" data-flex-grow="122" height="364" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/vba-using-dictionaries-to-improve-searching/image.png" width="445"&gt;&lt;/p&gt;
&lt;p&gt;Once the library is loaded you can now declare a variable as a dictionary.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Dim dictNames as Scripting.Dictionary
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="initialising-the-dictionary"&gt;Initialising the Dictionary
&lt;/h2&gt;&lt;p&gt;Dictionaries need initialising before you can use them. This can be done in the declaration of the variable or as a separate statement. I personally prefer the separate statement, means I get to chose when the variable is created.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#39; === Part of the declaration
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Dim dictNames As New Scripting.Dictionary
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#39; === Separate statement to initialise
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Dim dictNames As Scripting.Dictionary
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Set dictNames = New Scripting.Dictionary
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="adding-items-to-dictionaries"&gt;Adding Items to Dictionaries
&lt;/h2&gt;&lt;p&gt;Dictionary entries have 2 parts, key and item. The key is used when checking to see if a dictionary entry exists and the item value is returned by using the key. So if all you are using the dictionary for is to have a searchable list the item value could be the same as the key or a constant.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#39; === Add a dictionary entry
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dictNames.Add Key:=&amp;#34;Adam&amp;#34;, Item:=&amp;#34;0&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="checking-for-an-item-in-a-dictionary"&gt;Checking for an item in a dictionary
&lt;/h2&gt;&lt;p&gt;Once you have values in the dictionary you can check if a key value exists in the dictionary. The Exists method returns a Boolean based on if it can find the key value.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#39; === Check for a key in the dictionary
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If dictNames.Exists(Key:=&amp;#34;Adam&amp;#34;) Then
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; MsgBox &amp;#34;Adam is in the list&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Else
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; MsgBox &amp;#34;Adam is not in the list&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;End If
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="compare-a-dictionaries-to-an-arrays"&gt;Compare a dictionaries to an arrays
&lt;/h2&gt;&lt;p&gt;The data analyst in me wanted to check how each method compared. I expected the arrays method of looping through till you found or didn’t find would be slower. Both methods are fast so by doing 10,000 searches on a list 4,000 long with 25% of not found values the dictionary method won, but if the values were all found it was very close. Speed is not the only concern though when coding.&lt;/p&gt;
&lt;p&gt;The winner for me was the dictionary code was simpler, which reduces the technical debt of VBA code often written and maintained by business developers. The code below is to check if the value in strName is in an array or in a dictionary.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#39; === Array Method
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;For i = LBound(arrNames) To UBound(arrNames)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; If arrNames(i) = strName Then
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; blnFound = True
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Exit For
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; End If
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Next i
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#39; === Dictionary Method
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;blnFound = dictNames.Exists(strName)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;VBA is not leaving soon, however much every IT department would like it to vanish. Just because most VBA programmers are not professional coders, it doesn’t mean VBA can’t be written well. Adding references to helpful libraries is good practice and will help in the long term. If there is concern for future coders understanding dictionaries add links in the comments of your code to the references below.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;p&gt;Microsoft’s documentation is limited but can be found here &lt;a class="link" href="https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/dictionary-object" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/dictionary-object&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Paul Kelly has written a better blog with examples – &lt;a class="link" href="https://excelmacromastery.com/vba-dictionary/" target="_blank" rel="noopener"
 &gt;https://excelmacromastery.com/vba-dictionary/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="vba-posts"&gt;VBA Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Power Query Parameter Value&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Handling Null Values Properly</title><link>https://hatfullofdata.blog/power-query-handling-null-values/</link><pubDate>Mon, 13 Jan 2025 10:53:43 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-handling-null-values/</guid><description>&lt;p&gt;This post is about handling null values in Power Query calculations. If you do a calculation in Power Query that involves a null value the answer returned is null. In the example below we get nulls for the first three rows because either Credit or Debit values are null. On the fourth row we get the answer 460 because Credit and Debit contain values.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of data with Date, Description, Credit and Debit columns with an extra calculated column Total and the code is below and for the first three rows shows nulls." class="gallery-image" data-flex-basis="1108px" data-flex-grow="461" height="147" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handling-null-values/2024-12-31_12-22-52.png" width="679"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= Table.AddColumn(#&amp;#34;Changed Type&amp;#34;, &amp;#34;Total&amp;#34;, each [Credit] - [Debit] )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This post gives you 2 methods on how handle them. I personally prefer method 2, but each to their own.&lt;/p&gt;
&lt;h2 id="method-1--replace-null-values"&gt;Method 1 – Replace Null Values
&lt;/h2&gt;&lt;p&gt;The most common method recommended is to replace null values with a value that works, so in the above example a 0. So before I add the above calculation I highlight both the Credit and Debit columns. Then I click replace values on the Transform ribbon.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Replace values dialog with null in the Value to find and 0 in the Replace With box. And the final result showing no nulls." class="gallery-image" data-flex-basis="357px" data-flex-grow="148" height="457" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handling-null-values/2024-12-31_12-28-19.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The above works and is simple to explain and document. It does have the side effect that the average Credit and average Debit are now altered and filters to find just credits or debits will have to be different. It also takes 2 steps. The averages issue is the one that most people dislike.&lt;/p&gt;
&lt;h2 id="method-2--using-the-coalesce-operator-with-null-values"&gt;Method 2 – Using the Coalesce operator with Null Values
&lt;/h2&gt;&lt;p&gt;Coalesce functions, DAX has one, return the first non-null value. In Power Query there is a coalesce operator ??. So Credit ?? 0 will return the credit value unless it is null and then will return 0.&lt;/p&gt;
&lt;p&gt;So we can change our calculation to put ?? 0 after the column values and make it not return nulls. The Credit and Debit columns still have their original values for averages etc. It also is done within one step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of data with Date, Description, Credit and Debit columns with an extra calculated column Total using the new calculation shown below and there are no nulle nulls." class="gallery-image" data-flex-basis="1117px" data-flex-grow="465" height="146" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handling-null-values/2024-12-31_12-45-11.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= Table.AddColumn(#&amp;#34;Changed Type&amp;#34;, &amp;#34;Total&amp;#34;, each [Credit] ?? 0 - [Debit] ?? 0 )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Power Query M is one of my favourite languages but its weird. So these posts are for purely selfish reasons to remind me how to do things. ?? is a really simple operator that solves so many problems and Microsoft give it 2 lines! &lt;a class="link" href="https://learn.microsoft.com/en-us/powerquery-m/m-spec-operators" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/powerquery-m/m-spec-operators&lt;/a&gt;. It could of course be chained to Column1 ?? Column2 ?? Column3 will give the the first non-null value from the three columns, and return null if they are all null.&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Fixing Missing Columns Dynamically</title><link>https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/</link><pubDate>Wed, 08 Jan 2025 11:49:26 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/</guid><description>&lt;img src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/cover.png" alt="Featured image of post Power Query – Fixing Missing Columns Dynamically" /&gt;&lt;p&gt;One of the challenges of making sure your query works in Power Query is data sources that have a changing schema. Some APIs miss out fields if the data is null and sometimes we need one report able to handle data files that are almost the same but not quite. In this post we will look at fixing 2 scenarios, a single missing column and multiple missing columns.&lt;/p&gt;
&lt;p&gt;You know you have this problem when you get the an error similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="An error stating Expression Error, the column Debit of the table wasn’t found" class="gallery-image" data-flex-basis="1255px" data-flex-grow="523" height="130" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_10-09-49.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="single-missing-column"&gt;Single Missing Column
&lt;/h2&gt;&lt;p&gt;This scenario is fixing one column missing. In my example the query was written based on a file that had a Debit column. The query is now pointed to file that is missing that column. We need the query to work if the Debit column is in the original or not.&lt;/p&gt;
&lt;p&gt;&lt;img alt="2 screen shots of a query, first one with the last applied step selected and an missing columns error showing, second one with the previous step selected and no error showing" class="gallery-image" data-flex-basis="464px" data-flex-grow="193" height="351" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_10-14-49.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Start in the broken version and find the first step where there is not an error. The fix is to add the Debit column if the table does not have the column.&lt;/p&gt;
&lt;p&gt;M is not friendly to write so lets get the interface to write part of it. Click on Custom Column on the Add Column ribbon. Click Insert when prompted about inserting a step. Then enter in the name of the missing column for the column name and null for the value. When you click OK the column gets inserted and your query goes back to working.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Custom column dialog box showing the Debit column with a null value and the result table with the Debit column added." class="gallery-image" data-flex-basis="276px" data-flex-grow="115" height="590" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_10-27-53.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;But the query will fail when the file does include the Debit column. So we need to add some logic to the new step we added. We need to test to see if the table already has the column, if it does just return the table, if not add the column. This can be done using Table.HasColumns function and an “if” statement.&lt;/p&gt;
&lt;p&gt;The line of M created by the inserting a custom column is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= Table.AddColumn(#&amp;#34;Promoted Headers&amp;#34;, &amp;#34;Debit&amp;#34;, each null)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This needs to become&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= if Table.HasColumns(#&amp;#34;Promoted Headers&amp;#34;,&amp;#34;Debit&amp;#34;) 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; then #&amp;#34;Promoted Headers&amp;#34; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; else Table.AddColumn(#&amp;#34;Promoted Headers&amp;#34;, &amp;#34;Debit&amp;#34;, each null)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Please note the #”Promoted Headers” comes from the name of the previous step.&lt;/p&gt;
&lt;p&gt;Reference for HasColumns can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/powerquery-m/table-hascolumns?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/powerquery-m/table-hascolumns&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="multiple-missing-columns"&gt;Multiple Missing Columns
&lt;/h2&gt;&lt;p&gt;The previous method works great for a single column and maybe even 2 but if you have more columns than that you really need another method. In this example we have a set of data with columns for months Jan – Dec. At the start of the year there is only a Jan column but we need the query to return all the columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="error complaining about missing columns" class="gallery-image" data-flex-basis="1133px" data-flex-grow="472" height="144" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_10-54-24.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The error will only complain about the first column it finds missing but if we fixed Feb it would then complain that Mar was missing etc. When you append 2 tables it creates a table with all the columns of both tables even if one table does not contain any data. So if we can create an empty table with all the columns we want and then append the tables we will get all the columns added.&lt;/p&gt;
&lt;p&gt;Create a new blank query and enter in the formula to create a list of all the column names you want to make sure exist. Use {} brackets containing the column name strings separated by commas. This will display the list of values. Rename the query to something meaningful, for example Months.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= {&amp;#34;Jan&amp;#34;,&amp;#34;Feb&amp;#34;,&amp;#34;Mar&amp;#34;,&amp;#34;Apr&amp;#34;,&amp;#34;May&amp;#34;,&amp;#34;Jun&amp;#34;,&amp;#34;Jul&amp;#34;,&amp;#34;Aug&amp;#34;,&amp;#34;Sep&amp;#34;,&amp;#34;Oct&amp;#34;,&amp;#34;Nov&amp;#34;,&amp;#34;Dec&amp;#34;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Screen shot from Power Query showing the query with formula shown as the Source step." class="gallery-image" data-flex-basis="932px" data-flex-grow="388" height="175" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_11-01-40.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Now we need to add a step that converts this into a table. Right click on the Source step and select Insert Step After. Next we use #table function that takes 2 parameters, list of columns and values. We want an empty table so will use {} for the values. Change the formula to the following&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= #table( Source , {} )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="1554px" data-flex-grow="647" height="105" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_11-07-21.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Reference for #table can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/powerquery-m/sharptable?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/powerquery-m/sharptable&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Return to the broken query and find the last step that the query works. On the Home ribbon select Append Queries and select Insert when prompted about inserting a step. In the Append dialog select the query that has the empty table just created. Then click OK. Your query now has all the columns required and should work if the columns are missing columns or not&lt;/p&gt;
&lt;p&gt;&lt;img alt="Append dialog showing appending the Months table and the final table with the missing columns added" class="gallery-image" data-flex-basis="381px" data-flex-grow="158" height="428" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/2025-01-08_11-08-49.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="advanced-notes-on-missing-columns"&gt;Advanced Notes on Missing Columns
&lt;/h2&gt;&lt;p&gt;When appending 2 tables the first table columns will come first and in the order of the first table. So if you wish to order the columns of the query as well make sure your blank table query contains all the columns and the swap the order of the tables named in the Table.Combine step.&lt;/p&gt;
&lt;p&gt;The list of column names and creating the blank table could be put as steps within the original query. That requires being comfortable with the Advanced editor and writing M. For those interested here is an example query.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = Excel.Workbook(Web.Contents(ExcelPath), null, true),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Sheet2_Sheet = Source{[Item=&amp;#34;Sheet2&amp;#34;,Kind=&amp;#34;Sheet&amp;#34;]}[Data],
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Promoted Headers&amp;#34; = Table.PromoteHeaders(Sheet2_Sheet, [PromoteAllScalars=true]),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; AllColumns = {&amp;#34;Project&amp;#34;,&amp;#34;Jan&amp;#34;,&amp;#34;Feb&amp;#34;,&amp;#34;Mar&amp;#34;,&amp;#34;Apr&amp;#34;,&amp;#34;May&amp;#34;,&amp;#34;Jun&amp;#34;,&amp;#34;Jul&amp;#34;,&amp;#34;Aug&amp;#34;,&amp;#34;Sep&amp;#34;,&amp;#34;Oct&amp;#34;,&amp;#34;Nov&amp;#34;,&amp;#34;Dec&amp;#34;},
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; BlankTable = #table( AllColumns , {} ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Appended Query&amp;#34; = Table.Combine({BlankTable, #&amp;#34;Promoted Headers&amp;#34;}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Changed Type&amp;#34; = Table.TransformColumnTypes(#&amp;#34;Appended Query&amp;#34;,{{&amp;#34;Project&amp;#34;, type text}, {&amp;#34;Jan&amp;#34;, Int64.Type}, {&amp;#34;Feb&amp;#34;, Int64.Type}, {&amp;#34;Mar&amp;#34;, Int64.Type}, {&amp;#34;Apr&amp;#34;, Int64.Type}, {&amp;#34;May&amp;#34;, Int64.Type}, {&amp;#34;Jun&amp;#34;, Int64.Type}, {&amp;#34;Jul&amp;#34;, Int64.Type}, {&amp;#34;Aug&amp;#34;, Int64.Type}, {&amp;#34;Sep&amp;#34;, Int64.Type}, {&amp;#34;Oct&amp;#34;, Int64.Type}, {&amp;#34;Nov&amp;#34;, Int64.Type}, {&amp;#34;Dec&amp;#34;, Int64.Type}})
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Changed Type&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Queries should be dynamic when required and missing columns is a common issue. Writing M is not friendly, writing dynamic M takes practice but it is worth it. Power Query that copes with your unclean data is the reality of handling data. Bast of luck I hope this helped.&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Creating New Parameters</title><link>https://hatfullofdata.blog/power-query-creating-new-parameters/</link><pubDate>Mon, 06 Jan 2025 11:52:37 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-creating-new-parameters/</guid><description>&lt;img src="https://hatfullofdata.blog/power-query-creating-new-parameters/cover.png" alt="Featured image of post Power Query – Creating New Parameters" /&gt;&lt;p&gt;When fetching data into Power Query you need to use values to point you to the write the data, for example name of a database server or path to a csv file. Good practice is to use parameters for these values so your query is reusable etc. And its always our intention to go and create the new parameter later.&lt;/p&gt;
&lt;h2 id="missing-new-parameter-option"&gt;Missing New Parameter Option
&lt;/h2&gt;&lt;p&gt;So lets take the simplest option of connecting to a csv file on the web. I have my path so I click get data and select Web. For those that want to play along here is the path to the file I’m using.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://raw.githubusercontent.com/HatFullOfData/Demo/refs/heads/main/Products.csv
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The dialog that appears has a box for the URL but is missing the drop down on the left that will allow me to select New Parameter. If I had already created a parameter it gives me the option but not if I have no parameters. Bizarre functionality.&lt;/p&gt;
&lt;p&gt;&lt;img alt="From Web dialog with a text box for the URL but no dropdown to select New Parameter" class="gallery-image" data-flex-basis="745px" data-flex-grow="310" height="219" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-creating-new-parameters/2024-12-31_17-58-42.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="always-allow-parameters"&gt;Always Allow Parameters
&lt;/h2&gt;&lt;p&gt;The fix for this is to allow parameterization in data source dialogs. This can be done in the Power BI desktop options or on Power Query View ribbon for Power BI and Excel.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power BI options dialog with Power Query Editor selected and Parameters highlighted. And the View ribbon in Power Query with the Parameters group highlighted" class="gallery-image" data-flex-basis="370px" data-flex-grow="154" height="440" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-creating-new-parameters/2024-12-31_18-09-27.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once this is ticked when you now go to Get Data we get a drop down next to the text box. Now we can select New Parameter and enter in the details of the new parameter. When we click OK it returns to the first dialog with the new parameter selected.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing how to create a new parameter by clicking the drop down" class="gallery-image" data-flex-basis="632px" data-flex-grow="263" height="258" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-creating-new-parameters/2024-12-31_18-16-00.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;As a side note I recommend that you always give parameters a Type rather than leaving it on Any. There are a few features such as Power BI deployment pipelines that will not work with parameters of type Any.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This is a really small feature, possibly doesn’t need a whole blog post. But that little drop down making the creating a new parameter that few clicks easier means I am more likely to follow my own advice and use parameters from the start.&lt;/p&gt;</description></item><item><title>Trigger Microsoft Fabric Data Pipeline using Power Automate</title><link>https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/</link><pubDate>Sun, 06 Oct 2024 14:18:24 +0000</pubDate><guid>https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/</guid><description>&lt;img src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/cover.png" alt="Featured image of post Trigger Microsoft Fabric Data Pipeline using Power Automate" /&gt;&lt;p&gt;Microsoft Fabric Data Pipelines can be scheduled to happen at regular times. What happens when you want trigger Microsoft Fabric data pipelines to run as a reaction to an event? For example someone pressing a button in an app. For this we can use Power Automate to start a pipeline using a http request.&lt;/p&gt;
&lt;h2 id="fixed"&gt;Fixed
&lt;/h2&gt;&lt;p&gt;This post has incorrect details for the connector. These have now been fixed.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/9-aNXqDQaZE" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/Power-Automate-Trigger-Microsoft-Fabric-Data-Pipeline-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="workspace-and-pipeline-guids"&gt;Workspace and Pipeline GUIDs
&lt;/h2&gt;&lt;p&gt;The flow is going to use a http action that uses a URL that includes GUIDs for both the workspace and the data pipeline. Open the data pipeline that will be triggered. Look at the URL in the browser. The Workspace GUID is the string after /groups/ and the data pipeline GUID is the string after /pipelines/.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the data pipeline opened n a browser with highlights around the 2 GUIDs." class="gallery-image" data-flex-basis="712px" data-flex-grow="296" height="229" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/image-10.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="start-flow-and-add-variables"&gt;Start Flow and Add Variables
&lt;/h2&gt;&lt;p&gt;Now we have the required GUIDS we can start writing the flow. For this example we are going to use a manually triggered flow. Then we add an actions to initialise variables WorkspaceID and PipelineID and select Type of string and put in the values from the previous step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Flow with a trigger of Manually trigger a flow and 2 Initialize variables for WorkspaceID and PipelineID, with the former selected and showing parameters." class="gallery-image" data-flex-basis="602px" data-flex-grow="250" height="271" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="url-of-the-trigger-microsoft-fabric-data-pipeline-request"&gt;URL of the Trigger Microsoft Fabric Data Pipeline request
&lt;/h2&gt;&lt;p&gt;Next I recommend you use a compose step to calculate the URL for the HTTP call. Interestingly the api uses workspaces rather than groups. Make sure you have the corrects /s and no spaces between. If you have called your variables WorkspaceID and PipelineID you can just copy the code below into a Compose action.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://api.fabric.microsoft.com/v1/workspaces/@{variables(&amp;#39;WorkspaceID&amp;#39;)}/items/@{variables(&amp;#39;PipelineID&amp;#39;)}/jobs/instances?jobType=Pipeline
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Compose step containing the above code" class="gallery-image" data-flex-basis="911px" data-flex-grow="379" height="179" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/image-14.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The above url including all the flags is documented by Microsoft here – &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api#run-on-demand-item-job?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api#run-on-demand-item-job&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="http-request"&gt;HTTP Request
&lt;/h2&gt;&lt;p&gt;For this action we are going to use HTTP with Microsoft Entra ID (preauthorized) connection’s Invoke an HTTP request action. Search for HTTP and scroll down till you find it.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding the connection details for the HTTP action" class="gallery-image" data-flex-basis="715px" data-flex-grow="298" height="228" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/image-18.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If this is the first time you’ve used this action you will need to setup the connection to connect to this api you will need to set it up. The two urls required are below, sometimes they appear the other way around.&lt;/p&gt;
&lt;h4 id="base-resource-url"&gt;Base Resource URL
&lt;/h4&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://api.fabric.microsoft.com/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h4 id="microsoft-entra-id-resource-uri"&gt;Microsoft Entra ID Resource URI
&lt;/h4&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://analysis.windows.net/powerbi/api
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Once you have the connection sorted you can enter in the details of the request. The Method is POST and the Url of the request is the output from the compose step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Invoke an HTTP request action" class="gallery-image" data-flex-basis="750px" data-flex-grow="312" height="217" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/image-15.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="testing-trigger-microsoft-fabric-data-pipeline-flow"&gt;Testing Trigger Microsoft Fabric Data Pipeline Flow
&lt;/h2&gt;&lt;p&gt;The flow requires no inputs so can just be run. When the flow runs it appears to fail, but if you check the data pipeline run history you will see it was triggered just fine.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Test to Trigger Microsoft Fabric Data Pipeline" class="gallery-image" data-flex-basis="461px" data-flex-grow="192" height="354" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/image-17.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If you look in the documentation found at &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api#run-on-demand-item-job" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api#run-on-demand-item-job&lt;/a&gt;. There is a note that says “There is no body returned currently”. Eventually it will return the job id of the pipeline run, so I am guessing because that is not returned Power Automate assumes it failed.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Data pipelines are the orchestration tool of Microsoft Fabric so being able to connect it to the Power Platform orchestration tool makes perfect sense. I look forward to the day I can mark this post as redundant and there is a Power Automate connector with an obvious action for this.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate – Save a File to OneLake Lakehouse</title><link>https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/</link><pubDate>Thu, 03 Oct 2024 14:48:09 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/cover.png" alt="Featured image of post Power Automate – Save a File to OneLake Lakehouse" /&gt;&lt;p&gt;Currently there is no Microsoft Fabric connector in Power Automate. When we want Power Automate to save a file to OneLake Lakehouse, we need to use a workaround. This post walks through the demo I did for the Microsoft Fabric European Conference 2024. You need to be aware that this uses a premium connector!&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/Power-Automate-Copy-File-from-SharePoint-to-Lakehouse-Time-0_00_0000.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="getting-the-file-content"&gt;Getting the File Content
&lt;/h2&gt;&lt;p&gt;Before we can save a file anywhere we need the file content we are going to save. For this post I am going to work with the flow triggering from a new file in a SharePoint library and getting the file content action.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The trigger showing When a file is created and an action of Get file content" class="gallery-image" data-flex-basis="562px" data-flex-grow="234" height="290" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;From the SharePoint connector triggers, select the When a file is created (properties only) and populate the site address and library name. Next add a SharePoint action, Get file content. Populate the Site Address same as the trigger. For the File Identifier, select Identifier from the dynamic content from the trigger.&lt;/p&gt;
&lt;h2 id="lakehouse-folder-url"&gt;Lakehouse Folder URL
&lt;/h2&gt;&lt;p&gt;Next we need to know the url of the Lakehouse folder where we want the file to go. This can be found in the Lakehouse by clicking on the three dots next to the required folder and from the menu selecting properties. This will open the properties pane on the right hand side. Click the copy button next to the URL.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Lakehouse folder menu with Properties highlighted and the Properties pane with URL copy button highlighted" class="gallery-image" data-flex-basis="630px" data-flex-grow="262" height="259" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;To make life easy for ourselves we put this into a compose step followed by name of the file that triggered the flow. This is in the dynamic content from the trigger and is called File name with extension. Please note there is a / before the file name.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Compose step with the URL pasted in followed by the dynamic value from the trigger of File name with extension" class="gallery-image" data-flex-basis="597px" data-flex-grow="249" height="273" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="create-the-file-in-the-lakehouse"&gt;Create the file in the LakeHouse
&lt;/h2&gt;&lt;h3 id="set-up-the-connection"&gt;Set up the connection
&lt;/h3&gt;&lt;p&gt;We are going to use the HTTP with Microsoft Entra ID (preauthorised) action to interact with the Lakehouse to create the file. When you add the new action search for http and then scroll down to find the right action.&lt;/p&gt;
&lt;p&gt;&lt;img alt="search and select http to save a file to onelake lakehouse" class="gallery-image" data-flex-basis="680px" data-flex-grow="283" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If this is the first time you’ve used this action you will need to set-up the connection. Also if this is the first time you’ve connected to the Lakehouse in this way you need to setup a new connection. It asks for two URLS. Once connected you are ready to save a File to OneLake Lakehouse&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://onelake.dfs.fabric.microsoft.com/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://storage.azure.com/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="create-blank-file"&gt;Create Blank File
&lt;/h3&gt;&lt;p&gt;The first stage is to save a file to OneLake Lakehouse that is empty. This is a simple PUT action with a parameter of ?resource=file after the path created in the compose. So select PUT for the method. In the URL of the request but the Output from the compose and add on ?resource=file. I also renamed the action.&lt;/p&gt;
&lt;p&gt;&lt;img alt="HTTP" class="gallery-image" data-flex-basis="521px" data-flex-grow="217" height="313" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image-5.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="append-content"&gt;Append Content
&lt;/h3&gt;&lt;p&gt;Finally the last action is to append the file content from SharePoint onto the file. Change the Method to PATCH. The Url of the request is the output from the compose followed by three parameters (copy from below). Expand the Advanced parameters and into the body of the request select File Content from the dynamic content.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="437px" data-flex-grow="182" height="373" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;?action=append&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;position=0&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;flush=true
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="test-save-a-file-to-onelake-lakehouse"&gt;Test Save a File to OneLake Lakehouse
&lt;/h2&gt;&lt;p&gt;Save your flow and add a file to your SharePoint library and wait a minute or 2 for the flow to trigger. A file should appear in your Lake House.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of green success tips against all the actions in the flow and the file in SharePoint and the file in the Lakehouse" class="gallery-image" data-flex-basis="297px" data-flex-grow="124" height="548" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;There are plenty of business cases of use cases to be able to store a file into OneLake. Various legacy systems email daily exports which will need to be saved and processed in the LakeHouse. When / If we get a Fabric connector I look forward to making this post as redundant!&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Inherited Value in a Parent Child Pattern</title><link>https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/</link><pubDate>Mon, 23 Sep 2024 08:03:22 +0000</pubDate><guid>https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/</guid><description>&lt;img src="https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/cover.png" alt="Featured image of post Inherited Value in a Parent Child Pattern" /&gt;&lt;p&gt;In the previous post in this series we created a Parent Child hierarchy using a Dax Pattern from SQLBI. There are times it is useful to calculate an inherited value from parent item to child. The assigned to person on a User Story to be passed onto the child tasks that are not assigned to anyone, the target date of a feature to be passed down to the child user story and then onto the child tasks. The child items need to be completed before the parent target date.&lt;/p&gt;
&lt;h2 id="power-bi-and-devops-series"&gt;Power BI and DevOps Series
&lt;/h2&gt;&lt;p&gt;This post is part of a series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Get DevOps Data into Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/" target="_blank" rel="noopener"
 &gt;Add Parent Child Hierarchy using DAX Patterns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/" target="_blank" rel="noopener"
 &gt;Inherited Value in a Parent Child pattern&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add conditional formatting icons the easy way&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-logic"&gt;The Logic
&lt;/h2&gt;&lt;p&gt;We are going to add this as a calculated column into the work items table. If you were doing this by hand you would go through the items in the path column in reverse, looking up each target date until you found a non-blank one. In DAX we do this by creating a table of the WorkItemIDs in the path and looking up their target dates. Then we filter to only rows with target dates and take the first one.&lt;/p&gt;
&lt;h2 id="inherited-value-dax"&gt;Inherited Value DAX
&lt;/h2&gt;&lt;p&gt;Lets work through an example.&lt;/p&gt;
&lt;p&gt;WorkItem 46 has an ItemPath of 38|39|45|46, which means it has a Path length of 4. So we start by using GENERATESERIES to create a column 1-4&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;GENERATESERIES( 1 , PATHLENGTH( WorkItems[ItemPath] ), 1 )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Value1234&lt;/p&gt;
&lt;p&gt;We put that inside a GENERATE function and use PATHITEMREVERSE to get the work item ids from the path and then LOOKUP to use that WorkItemID to get the TargetDate of each item. GENERATE function and nested VARs is one of my favourite combinations.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR tabWorkItems = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATE(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATESERIES( 1 , PATHLENGTH( WorkItems[ItemPath] ), 1 ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; VAR tableRow = [Value]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; VAR _WorkItemID = VALUE( PATHITEMREVERSE( WorkItems[ItemPath] , tableRow ) )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; VAR _TargetDate = LOOKUPVALUE( WorkItems[TargetDate] , WorkItems[WorkItemId] , _WorkItemID )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; RETURN ROW ( 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;WorkItemID&amp;#34;,_WorkItemID,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;TargetDate&amp;#34;,_TargetDate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;ValueWorkItemIDTargetDate1462453392024-09-094382024-11-1&lt;/p&gt;
&lt;p&gt;Then we filter the table to rows with a TargetDate and take the first row ordered by Value. This gives us one row of data.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR tabFiltered =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; TOPN( 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 1,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; FILTER(tabWorkItems,[TargetDate]&amp;gt;BLANK()),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; [Value],ASC
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;ValueWorkItemIDTargetDate3392024-09-09&lt;/p&gt;
&lt;p&gt;Finally we use MINX to extract the TargetDate of that single row. The final calculated column DAX looks like this.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Inherited Target Date = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Create a table of Value, WorkitemID and TargetDate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR tabWorkItems = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATE(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATESERIES( 1 , PATHLENGTH( WorkItems[ItemPath] ), 1 ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; VAR tableRow = [Value]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; VAR _WorkItemID = VALUE( PATHITEMREVERSE( WorkItems[ItemPath] , tableRow ) )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; VAR _TargetDate = LOOKUPVALUE( WorkItems[TargetDate] , WorkItems[WorkItemId] , _WorkItemID )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; RETURN ROW ( 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;WorkItemID&amp;#34;,_WorkItemID,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;TargetDate&amp;#34;,_TargetDate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Take the first row of the filtered to non-blank
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR tabFiltered =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; TOPN( 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 1,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; FILTER(tabWorkItems,[TargetDate]&amp;gt;BLANK()),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; [Value],ASC
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Return the Target Date
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Result = MINX( tabFiltered , [TargetDate] )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN Result
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Table showing WorkItemId, Title, TargetDate and Inherited Value of Target Date for items 38,39,45 and 46" class="gallery-image" data-flex-basis="983px" data-flex-grow="409" height="166" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/image.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="inherited-value-conclusion"&gt;Inherited Value Conclusion
&lt;/h2&gt;&lt;p&gt;The Parent Child pattern is very useful and adding in the inherited values adds extra possibilities. I wanted to be able to identify the child items that were making the parent items late.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;p&gt;This post builds on the last post in this series and using the SQLBI Parent Child found at &lt;a class="link" href="https://www.daxpatterns.com/parent-child-hierarchies/" target="_blank" rel="noopener"
 &gt;https://www.daxpatterns.com/parent-child-hierarchies/&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>DevOps Parent Child Hierarchy in Power BI</title><link>https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/</link><pubDate>Mon, 02 Sep 2024 08:27:43 +0000</pubDate><guid>https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/</guid><description>&lt;img src="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/cover.png" alt="Featured image of post DevOps Parent Child Hierarchy in Power BI" /&gt;&lt;p&gt;Azure DevOps is built around the pattern than items have child items and so a backlog view will show the items in a hierarchy. When the work items some into Power BI that is not shown. So this gives me the chance to use one of my favourite resources from SQLBI, DAX Patterns and their Parent-Child pattern.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab from DevOps showing a backlog view of nested items" class="gallery-image" data-flex-basis="468px" data-flex-grow="195" height="348" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/image-8.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I am using the Agile process so the hierarchy is Epic – Feature – User Story – Task. I have made sure my project includes all the layers correctly. You can work around oddities but for this post we will assume all layers of the items are as we expect.&lt;/p&gt;
&lt;h2 id="power-bi-and-devops-series"&gt;Power BI and DevOps Series
&lt;/h2&gt;&lt;p&gt;This post is part of a series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Get DevOps Data into Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/" target="_blank" rel="noopener"
 &gt;Add Parent Child Hierarchy using DAX Patterns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/" target="_blank" rel="noopener"
 &gt;Inherited Value in a Parent Child pattern&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add conditional formatting icons the easy way&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="dax-patterns--parent-child-hierarchy"&gt;DAX Patterns – Parent Child Hierarchy
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Dax Patterns logo" class="gallery-image" data-flex-basis="652px" data-flex-grow="272" height="136" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/Dax-Patterns.png" width="370"&gt;&lt;/p&gt;
&lt;p&gt;DAX patterns comes in multiple formats, a book, a website and videos. They are written by SQLBI and have saved me hours and hours. For this post we are going to adapt the Parent-Child pattern to DevOps data. I am going to use the report built in the previous post in this series. The pattern is fully explained here &lt;a class="link" href="https://www.daxpatterns.com/parent-child-hierarchies" target="_blank" rel="noopener"
 &gt;https://www.daxpatterns.com/parent-child-hierarchies&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="adding-the-path"&gt;Adding the Path
&lt;/h2&gt;&lt;p&gt;The pattern uses a function called path. This function takes an row id and the parent row id and walks up the path until it reaches a row with no parent. Work Items in DevOps have WorkItemID and ParentWorkItemID. So following the instructions we add a column to the WorkItems table.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ItemPath = PATH(WorkItems[WorkItemId],WorkItems[ParentWorkItemId])
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="WorkItems table table showing WorkitemID, Title, ParentWorkItemId and the new column ItemPath" class="gallery-image" data-flex-basis="759px" data-flex-grow="316" height="215" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The ItemPath gives us the list of IDs in the hierarchy above the current row. It does requires the path to be complete so it might not work if you have filtered out some of the items.&lt;/p&gt;
&lt;h2 id="adding-devops-hierarchy-level-columns"&gt;Adding DevOps Hierarchy Level Columns
&lt;/h2&gt;&lt;p&gt;From the above post these are the Level 1 to Level 4 columns, we just need to swap out the right column names. We also know the the names of our levels from DevOps so we can use slightly more meaningful names, Level 1 = Epic, Level 2 = Feature etc. Add the 4 columns using the pattern below, copied straight from the SQLBI post.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Epic = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR LevelNumber = 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR LevelKey = PATHITEM ( WorkItems[ItemPath], LevelNumber, INTEGER )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR LevelName = LOOKUPVALUE ( WorkItems[Title], WorkItems[WorkItemId], LevelKey )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Result = LevelName
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Result
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Table of data showing ItemPath, Epic, Feature, User Story and Task columns." class="gallery-image" data-flex-basis="602px" data-flex-grow="250" height="271" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/image-9.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-a-matrix"&gt;Adding a Matrix
&lt;/h2&gt;&lt;p&gt;The quickest way to see the hierarchy in action is to add a matrix visual. Into the rows we put the levels of the hierarchy to whatever levels we want. Into the values I put # Work Items. It looks great we can expand the different levels and see the 72 work items split out into features etc.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Picture of the matrix showing the 4 fields added to Rows and Work Items measure added to Values and the blank lines that appear in the Matrix at the top of each expanded section" class="gallery-image" data-flex-basis="348px" data-flex-grow="145" height="468" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/image-10.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;But we get blank rows at the top of each section. Not to worry of course our friends at SQLBI have a solution.&lt;/p&gt;
&lt;h2 id="fixing-the-measures"&gt;Fixing the measures
&lt;/h2&gt;&lt;p&gt;In order for this to work we need to compare the maximum path length with the level being displayed. The path length we add as a column Depth to Work Items and then add a measure MaxRowDepth. Then using ISINSCOPE function we calculate the display depth in a measure called ItemBrowseDepth.&lt;/p&gt;
&lt;h3 id="column-added-to-workitems-table"&gt;Column Added to WorkItems table
&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Depth = PATHLENGTH( WorkItems[ItemPath] )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="2-measures-added-to-workitems-table"&gt;2 Measures Added to WorkItems table
&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;MaxRowDepth = MAX( WorkItems[Depth] )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ItemBrowseDepth =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ISINSCOPE ( WorkItems[Epic] ) 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; + ISINSCOPE ( WorkItems[Feature] )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; + ISINSCOPE ( WorkItems[User Story] )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; + ISINSCOPE ( WorkItems[Task] )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Now we can add measures that use these values to decide if to display the row or not. The logic being we only show rows where the browse depth is less than or equal to the max row depth. So I fix the # Work Items using the example from the SQLBI Pattern.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;span class="lnt"&gt;55
&lt;/span&gt;&lt;span class="lnt"&gt;56
&lt;/span&gt;&lt;span class="lnt"&gt;57
&lt;/span&gt;&lt;span class="lnt"&gt;58
&lt;/span&gt;&lt;span class="lnt"&gt;59
&lt;/span&gt;&lt;span class="lnt"&gt;60
&lt;/span&gt;&lt;span class="lnt"&gt;61
&lt;/span&gt;&lt;span class="lnt"&gt;62
&lt;/span&gt;&lt;span class="lnt"&gt;63
&lt;/span&gt;&lt;span class="lnt"&gt;64
&lt;/span&gt;&lt;span class="lnt"&gt;65
&lt;/span&gt;&lt;span class="lnt"&gt;66
&lt;/span&gt;&lt;span class="lnt"&gt;67
&lt;/span&gt;&lt;span class="lnt"&gt;68
&lt;/span&gt;&lt;span class="lnt"&gt;69
&lt;/span&gt;&lt;span class="lnt"&gt;70
&lt;/span&gt;&lt;span class="lnt"&gt;71
&lt;/span&gt;&lt;span class="lnt"&gt;72
&lt;/span&gt;&lt;span class="lnt"&gt;73
&lt;/span&gt;&lt;span class="lnt"&gt;74
&lt;/span&gt;&lt;span class="lnt"&gt;75
&lt;/span&gt;&lt;span class="lnt"&gt;76
&lt;/span&gt;&lt;span class="lnt"&gt;77
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Work Items =
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Val = COUNTROWS ( WorkItems )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR ShowRow = [ItemBrowseDepth] 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This now fixes the matrix to not show blank rows
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![Matrix with no blank rows](image-11.png)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Conclusion on Parent Child Hierarchy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This makes the DevOps data easy to report on. The measures roll up the data to the different levels so the total hours can be calculated etc. Handling DevOps plans with missing layers is hard work, I’ve done it where some User Stories were children of the Epic. That made the pattern clunky so I’d probably push back now and insist the DevOps plan was kept clean.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## More Power BI Posts
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Conditional Formatting Update](https://hatfullofdata.blog/power-bi-conditional-formatting-update/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Data Refresh Date](https://hatfullofdata.blog/power-bi-data-refresh-date/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Using Inactive Relationships in a Measure](https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [DAX CrossFilter Function](https://hatfullofdata.blog/power-bi-dax-crossfilter-function/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [COALESCE Function to Remove Blanks](https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Personalize Visuals](https://hatfullofdata.blog/power-bi-personalize-visuals/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Gradient Legends](https://hatfullofdata.blog/power-bi-gradient-legends/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Endorse a Dataset as Promoted or Certified](https://hatfullofdata.blog/power-bi-endorse-a-dataset/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Q&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;A Synonyms Update](https://hatfullofdata.blog/power-bi-qa-synonyms-update/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Import Text Using Examples](https://hatfullofdata.blog/power-bi-import-text-using-examples/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Paginated Report Resources](https://hatfullofdata.blog/paginated-report-resources/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Refreshing Datasets Automatically with Power BI Dataflows](https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Charticulator](https://hatfullofdata.blog/charticulator-simple-custom-chart/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Dataverse Connector – July 2022 Update](https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Dataverse Choice Columns](https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Switch Dataverse Tenancy](https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Connecting to Google Analytics](https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Take Over a Dataset](https://hatfullofdata.blog/power-bi-take-over-a-dataset/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Export Data from Power BI Visuals](https://hatfullofdata.blog/export-data-from-power-bi-visuals/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Embed a Paginated Report](https://hatfullofdata.blog/power-bi-embed-a-paginated-report/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Using SQL on Dataverse for Power BI](https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Power Platform Solution and Power BI Series](https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Creating a Custom Smart Narrative](https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Power Automate Button in a Power BI Report](https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Power BI Series
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [SVG in Power BI series](https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Power BI and Project Online series](https://hatfullofdata.blog/power-bi-connecting-to-project-online/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Slicers series](https://hatfullofdata.blog/power-bi-slicers-introduction/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Dataflow series](https://hatfullofdata.blog/power-bi-create-a-dataflow/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Power BI SVG series](https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Power Automate and Power BI Rest API series](https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Power BI and DevOps series](https://hatfullofdata.blog/devops-data-into-power-bi/)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Get DevOps Data into Power BI</title><link>https://hatfullofdata.blog/devops-data-into-power-bi/</link><pubDate>Tue, 27 Aug 2024 09:09:57 +0000</pubDate><guid>https://hatfullofdata.blog/devops-data-into-power-bi/</guid><description>&lt;img src="https://hatfullofdata.blog/devops-data-into-power-bi/cover.png" alt="Featured image of post Get DevOps Data into Power BI" /&gt;&lt;p&gt;Azure DevOps is full of data that management want to to report on. Adding a Power BI report is an obvious way to do this. There are plenty of sample reports and Microsoft posts giving you guidance how to get DevOps data into Power BI. This post is my take on how I would build the reports. My focus is making them easy to extend and easy to point at a different organisation and project.&lt;/p&gt;
&lt;h2 id="power-bi-and-devops-series"&gt;Power BI and DevOps Series
&lt;/h2&gt;&lt;p&gt;This post is part of a series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Get DevOps Data into Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-parent-child-hierarchy-in-power-bi/" target="_blank" rel="noopener"
 &gt;Add Parent Child Hierarchy using DAX Patterns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/inherited-value-in-a-parent-child-pattern/" target="_blank" rel="noopener"
 &gt;Inherited Value in a Parent Child pattern&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add conditional formatting icons the easy way&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/DAHEv2YoTP8" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/Power-BI-and-Devops-Data-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="microsoft-references-for-devops-data-into-power-bi"&gt;Microsoft References for DevOps Data into Power BI
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/azure/devops/report/powerbi/odataquery-connect?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/azure/devops/report/powerbi/odataquery-connect&lt;/a&gt;Great post showing you to use Visual Studio Code to write the query, test it and then use it in Power BI&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-odata-overview?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-odata-overview&lt;/a&gt;Lots of sample reports&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="odata-queries"&gt;OData Queries
&lt;/h2&gt;&lt;p&gt;We get DevOps Data into Power BI using an OData query. From the first Microsoft link above it shows the query is made up of different parts. The first part is a path and then extras that select columns, filter the data and sort the data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Example OData query to get DevOps Data into Power BI. Scroll down to find a code version" class="gallery-image" data-flex-basis="1717px" data-flex-grow="715" height="95" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The simplest form though is just the URL, that will bring through all the columns and all the rows of data. We will start with that.&lt;/p&gt;
&lt;h2 id="simplest-query-for-work-items"&gt;Simplest Query for Work Items
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://analytics.dev.azure.com/{Organisation}/{Project}/_odata/v3.0-preview/WorkItems?
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The path includes the organisation and the project names. So we start in Power Query, by clicking on Transform data on the Home ribbon in Power BI. Then click on Manage Parameters to open a dialog. You need to add 2 parameters, Organisation and Project. Click on New to start a new parameter, enter in a name and description (yes add that description, future you will thank you), select type text and enter in the current value for the Organisation and the Project.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots of the Transform data button, the Manage Parameters button and then the dialog showing the list of Parameters and the form to fill in" class="gallery-image" data-flex-basis="226px" data-flex-grow="94" height="722" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We could now use Get Data and select OData and build the string… But that is hard work and not easy to read! So I’ve written a template to walk you through. Click on New Source and select blank query. Click on Advanced Editor and paste in the code below.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Path using 2 parameters
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Path = &amp;#34;https://analytics.dev.azure.com/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Organisation &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Project &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/_odata/v3.0-preview/WorkItems?&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // URL made up of parts
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; URL = Path,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Do the OData query
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = OData.Feed(URL, null, [Implementation=&amp;#34;2.0&amp;#34;,OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The Path line uses the 2 parameters and points to the WorkItems. The URL line looks redundant now but will make more sense when the query has more parts. The Source line uses the URL and includes the flags recommended by the link at the top of this post to prevent throttling.&lt;/p&gt;
&lt;p&gt;When you click OK and set up the connection if required you should get a table of data with lots of columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of data from DevOps showing various columns" class="gallery-image" data-flex-basis="766px" data-flex-grow="319" height="213" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="selecting-the-columns"&gt;Selecting the columns
&lt;/h2&gt;&lt;p&gt;The above query gives us more columns than we want. Rather than removing the columns in Power Query we can add a select line to the query which will make the OData query faster. So we need to pick the columns we want while we can see them all. I selected and put them into a comma separated string to make up a $select string to add to the Power Query&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Path using 2 parameters and select columns
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Path = &amp;#34;https://analytics.dev.azure.com/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Organisation &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Project &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/_odata/v3.0-preview/WorkItems?&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Select = &amp;#34;$select=WorkItemID,Title,WorkItemType,State,TargetDate,ParentWorkItemID,OriginalEstimate,AssignedToUserSK&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // URL made up of parts
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; URL = Path &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Select,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Do the OData query
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = OData.Feed(URL, null, [Implementation=&amp;#34;2.0&amp;#34;,OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;When you finish editing the query you will get a table of the work items from DevOps.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of data just showing the 8 columns selected." class="gallery-image" data-flex-basis="1066px" data-flex-grow="444" height="153" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/image-4.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You could add more parts to the query for filtering and sorting if required.&lt;/p&gt;
&lt;h2 id="user-and-calendar-table"&gt;User and Calendar Table
&lt;/h2&gt;&lt;p&gt;DevOps has other tables including a user list and a calendar. These can be pulled through to Power BI using the same pattern.&lt;/p&gt;
&lt;h3 id="users"&gt;Users
&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Path using 2 parameters and select columns
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Path = &amp;#34;https://analytics.dev.azure.com/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Organisation &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Project &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/_odata/v3.0-preview/Users?&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Select = &amp;#34;$select=UserSK,UserName,UserEmail&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // URL made up of parts 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; URL = Path &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Select,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Do the OData query
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = OData.Feed(URL, null, [Implementation=&amp;#34;2.0&amp;#34;,OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="calendar"&gt;Calendar
&lt;/h3&gt;&lt;p&gt;This includes a filter for the Year to be greater than or equal to, ge, 2023.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Path using 2 parameters and select columns
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Path = &amp;#34;https://analytics.dev.azure.com/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Organisation &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Project &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/_odata/v3.0-preview/Dates?&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Select = &amp;#34;$select=Date,MonthName,MonthOfYear,Year&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Filter = &amp;#34;&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;$filter=Year ge 2023&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // URL made up of parts 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; URL = Path &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Select &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Filter,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Do the OData query
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = OData.Feed(URL, null, [Implementation=&amp;#34;2.0&amp;#34;,OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="some-modelling"&gt;Some Modelling
&lt;/h2&gt;&lt;p&gt;Once the queries are written and loaded into Power BI desktop we are ready to do some modelling. I’m keeping it very light as I have another post coming that will implement the Parent Child hierarchy needed.&lt;/p&gt;
&lt;h3 id="relationships"&gt;Relationships
&lt;/h3&gt;&lt;p&gt;The relationship model is only three tables, fact table WorkItems and the 2 dimension tables Users and Calendar. The relationships are&lt;/p&gt;
&lt;p&gt;TableColumnRelationshipTableColumnUsersUserSK1 to ManyWorkItemsAssignedToUserSKCalendarDate1 to ManyWorkItemsTargetDate&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab from the relationships screen" class="gallery-image" data-flex-basis="396px" data-flex-grow="165" height="412" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/image-5.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="measures"&gt;Measures
&lt;/h3&gt;&lt;p&gt;I only created two measures. The first was for the total hours in the original estimate column. If we had included completed and remaining hours I would have created measures for them as well. The second one was for the count of items&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Total Hours = SUM(WorkItems[OriginalEstimate])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Work Items = COUNTROWS(WorkItems)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="create-visuals"&gt;Create Visuals
&lt;/h2&gt;&lt;p&gt;I kept it simple. Not all the tasks had Target dates so we could not do much via dates. So I had total hours and number of tasks and Users and Item States. I created a table and a tree map visual.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of a table listing the users with # Work Items and Total Hours and then below a treemap showing Total Hours by State" class="gallery-image" data-flex-basis="257px" data-flex-grow="107" height="634" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-data-into-power-bi/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion-on-devops-data-into-power-bi"&gt;Conclusion on DevOps Data into Power BI
&lt;/h2&gt;&lt;p&gt;The above model is limited, I can’t see the structure of the project, I can’t rollup the tasks into user stories etc. It does have the data in it to get there though. The next post on adding the Parent-Child hierarchy will help.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Editing Azure DevOps items in Excel</title><link>https://hatfullofdata.blog/editing-azure-devops-items-in-excel/</link><pubDate>Tue, 20 Aug 2024 08:30:38 +0000</pubDate><guid>https://hatfullofdata.blog/editing-azure-devops-items-in-excel/</guid><description>&lt;img src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/cover.png" alt="Featured image of post Editing Azure DevOps items in Excel" /&gt;&lt;p&gt;One of the easiest ways to edit a project in Azure DevOps is to connect Excel to the project. This post walks you through connecting to a project and updating the DevOps items in Excel. Its mostly for selfish reasons as I need to remember how to do this.&lt;/p&gt;
&lt;p&gt;Microsoft also has a post about this at &lt;a class="link" href="https://learn.microsoft.com/en-us/azure/devops/boards/backlogs/office/bulk-add-modify-work-items-excel?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/azure/devops/boards/backlogs/office/bulk-add-modify-work-items-excel&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="add-excel-extension"&gt;Add Excel Extension
&lt;/h2&gt;&lt;p&gt;This needs an Excel extension added from the Visual Studio site. You need to download Azure DevOps Office Integration 2019 from here and execute&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://visualstudio.microsoft.com/downloads/#azure-devops-office-integration-2019" target="_blank" rel="noopener"
 &gt;Download Visual Studio Tools – Install Free for Windows, Mac, Linux (microsoft.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab from the link showing the item to download, Azure DevOps Office Integration 2019" class="gallery-image" data-flex-basis="1569px" data-flex-grow="653" height="104" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-14_15-17-51.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you have done this, in Excel you will have a Team ribbon.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Team ribbon in Excel" class="gallery-image" data-flex-basis="1316px" data-flex-grow="548" height="124" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-19_10-50-09.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="create-a-tree-query"&gt;Create a Tree Query
&lt;/h2&gt;&lt;p&gt;If you want to edit many items including child and parent hierarchy, then the easiest way is to write a tree query in DevOps that loads the right tasks and then use that to pull the right tasks into Excel. In DevOps under Boards select Queries. Then select New Query. Change query type to Tree of work items and type of tree to Parent/Child. Select the right filters to pull the items you want and then save your query. Save and run the query to make sure you get a hierarchy of tasks. In my example I wanted all the items in the project.&lt;/p&gt;
&lt;p&gt;&lt;img alt="creating a tree query in DevOps" class="gallery-image" data-flex-basis="319px" data-flex-grow="133" height="511" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-19_11-39-24.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="connect-to-a-devops-project"&gt;Connect to a DevOps Project
&lt;/h2&gt;&lt;p&gt;On the Team ribbon, click on New List. If this is the first time you’ve connected you need to add a server first.&lt;/p&gt;
&lt;h3 id="adding-a-server"&gt;Adding a Server
&lt;/h3&gt;&lt;p&gt;Click on the Servers button. Then in the next dialog, click on Add. Into the next dialog enter in the url to the organisation, for example &lt;a class="link" href="https://dev.azure.com/HatFullOfData/" target="_blank" rel="noopener"
 &gt;https://dev.azure.com/HatFullOfData/&lt;/a&gt;. Click OK to finish adding the server, you will be prompted to login. Click Close to return to the original dialog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots of the dialogs to add a server and finally the Connect window showing the Team Projects on the server." class="gallery-image" data-flex-basis="394px" data-flex-grow="164" height="414" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-19_10-53-07.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="connecting-to-a-project"&gt;Connecting to a project
&lt;/h3&gt;&lt;p&gt;You start from the connect to Azure DevOps dialog, which will open from adding a server or opened by clicking on New List on the Team ribbon on a new sheet. Select the server and select the right project and click connect. Select your tree query from the drop down and click OK The tasks from the project should load as a table into Excel.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The two dialogs described in the text and the table of DevOps items in Excel" class="gallery-image" data-flex-basis="383px" data-flex-grow="159" height="426" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-19_14-57-18.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The table format needs some explaining. Title 1 is the name of the highest level tasks and Title 2 etc are children of the Title 1 task above it. You can add another level of hierarchy by clicking on Add Tree Level from the Team ribbon. You can also add other DevOps columns by clicking Choose Columns and using the middle buttons to add or remove columns in the Choose columns dialog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Team ribbon with Choose Columns and Add Tree Level highlighted and the Choose columns dialog." class="gallery-image" data-flex-basis="274px" data-flex-grow="114" height="595" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-19_15-15-34-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-and-publishing-devops-items-in-excel"&gt;Adding and Publishing DevOps items in Excel
&lt;/h2&gt;&lt;p&gt;Items can be added to the table just typing in new rows. The ID column leave blank, the Title 1 – 4 fill in making sure you understand the hierarchy. Some fields such as Target Date are read only for some Work Item Types. When you want to see the results in DevOps click on Publish. Then open DevOps to see the work items.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the DevOps items in Excel and then the items in DevOps" class="gallery-image" data-flex-basis="374px" data-flex-grow="155" height="436" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/editing-azure-devops-items-in-excel/2024-08-19_15-50-22.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I needed to create a project plan in DevOps from a list of tasks I had in a text file ready for a demo. There were 80 tasks and I knew I could it them quicker in Excel than I could in DevOps because I am more familiar with Excel. I also wanted to note down how I then loaded those tasks into DevOps from Excel.&lt;/p&gt;
&lt;p&gt;Other related series include:&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>DevOps updates on behalf of another with Power Automate</title><link>https://hatfullofdata.blog/devops-updates-on-behalf-of-another/</link><pubDate>Mon, 19 Aug 2024 09:34:27 +0000</pubDate><guid>https://hatfullofdata.blog/devops-updates-on-behalf-of-another/</guid><description>&lt;img src="https://hatfullofdata.blog/devops-updates-on-behalf-of-another/cover.png" alt="Featured image of post DevOps updates on behalf of another with Power Automate" /&gt;&lt;p&gt;I had a need to use automation to do DevOps updates on behalf of another person so when the DevOps adoption metrics were done we the stats were slightly more accurate. This can only be done using REST API and will need permissions. This post is part of the DevOps and Power Automate series.&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;It’s on the backlog!&lt;/p&gt;
&lt;h2 id="permission-required-to-makes-updates-on-behalf-of-another"&gt;Permission required to makes updates on behalf of another
&lt;/h2&gt;&lt;p&gt;The trick to being able update on behalf of another is to update the ChangedBy field to another persons email address. This is not normally allowed, it breaks the rules. So the permission we need is to bypass the rules and make illegal updates.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Setting up permissions in project settings to allow for updates on behalf of another" class="gallery-image" data-flex-basis="1095px" data-flex-grow="456" height="149" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-updates-on-behalf-of-another/2024-08-19_09-31-25.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Permissions are managed in Project Settings, you then click on permissions. Click on Users at the top and then click on the user being used in the flow to show their permissions. Under Boards check the permission for Bypass rules on work item updates. This needs to be set to Allow.&lt;/p&gt;
&lt;h2 id="make-updates-on-behalf-of-another"&gt;Make Updates on behalf of another
&lt;/h2&gt;&lt;p&gt;Now we have permission is ignore the rules we can test out a flow. In the REST API documentation for updating an item &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update&lt;/a&gt; you will see there is a boolean parameter bypassRules. This can be added to the relative URI using &amp;amp; to separate the parameters.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Send an HTTP request to Azure DevOps action with the bypassRules flag added to the URI and in the Body JSON an extra section to update the ChangedBy field. See Code below." class="gallery-image" data-flex-basis="236px" data-flex-grow="98" height="689" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-updates-on-behalf-of-another/2024-08-19_09-53-45.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the body section I have added an update to the ChangedBy field. This update updates the State to active and performs it on behalf of Dan. In the task history we can see the update and see I did it on behalf of Dan.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Work item history showing the line Dan Cooke (via Laura Graham-Brown) changed State from New to Active" class="gallery-image" data-flex-basis="352px" data-flex-grow="146" height="463" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-updates-on-behalf-of-another/2024-08-19_10-02-21-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="word-of-caution"&gt;Word of caution
&lt;/h2&gt;&lt;p&gt;By passing the rules, it also means that the updates behind the scenes that happen are turned off. If we change the state to closed using the same technique the we get an error when we open the work item.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Send an HPPP request to Azure DevOps action with bypassRules=true and changing the state to Closed. Plus a screen shot of the updated task opened and showing an error of Field Closed Date cannot be empty." class="gallery-image" data-flex-basis="473px" data-flex-grow="197" height="345" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/devops-updates-on-behalf-of-another/2024-08-19_10-11-52.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;So make sure you have checked the updates you are doing and include all the fields you need to update, even the hidden ones.&lt;/p&gt;
&lt;p&gt;Second word of warning is no checks are done on the updates. So you can assign a task to an email address that doesn’t have access, or update to a state that is not valid. So treat this one with caution.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Updates on behalf of another is a very powerful trick. But should be treated with extra caution and it has made me double check permissions on a ew projects so access to by passing the rules is limited.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Update DevOps without Notifications with Power Automate</title><link>https://hatfullofdata.blog/update-devops-without-notifications/</link><pubDate>Fri, 16 Aug 2024 07:52:49 +0000</pubDate><guid>https://hatfullofdata.blog/update-devops-without-notifications/</guid><description>&lt;img src="https://hatfullofdata.blog/update-devops-without-notifications/cover.png" alt="Featured image of post Update DevOps without Notifications with Power Automate" /&gt;&lt;p&gt;When a work item is assigned to you, by default you are sent a notification. Notifications can also be sent regarding updates to your items. Now imagine creating over 10 thousand tasks automatically and assigning them to people. I recently did this on a projects and potentially each person was going to get 100s of emails. So I needed Power Automate to assign the tasks without notifications. This post is part of the Power Automate and DevOps series.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Email telling you a work item has been assigned to you" class="gallery-image" data-flex-basis="370px" data-flex-grow="154" height="440" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/update-devops-without-notifications/2024-08-14_13-49-44.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;They are on the backlog!&lt;/p&gt;
&lt;h2 id="permissions-for-updates-without-notifications"&gt;Permissions for updates without notifications
&lt;/h2&gt;&lt;p&gt;Updating DevOps without notifications is not something that everyone should be able to do. Or at least the admins will want to be able to control who can do it.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="922px" data-flex-grow="384" height="177" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/update-devops-without-notifications/2024-08-14_14-06-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the Project settings, click on Permissions. Then click on Users to list your users. When you click on a person you get to see all their permissions. They can be Allow, Deny or Not Set for all the different actions. (inherited) means it is set by being a member of a group. If you hover your cursor over the (i) you will get a description telling you which membership the permission as inherited from. A Deny overrides an allow, so you might need to manually override the inherited permission.&lt;/p&gt;
&lt;p&gt;The permission we are interested in is Suppress notifications for work item updates.&lt;/p&gt;
&lt;h2 id="updating-without-notifications"&gt;Updating without Notifications
&lt;/h2&gt;&lt;p&gt;Now we have the permission we can test it out in an update. This can only be done on updates done by a REST API call. If you look on &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update?" target="_blank" rel="noopener"
 &gt;https://learn.&lt;/a&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;microsoft.com/en-us/rest/api/azure/devops/wit/work-items/update&lt;/a&gt; there is a URI parameter suppressNotifications which is a boolean.&lt;/p&gt;
&lt;p&gt;URI parameters get added after the ? and are separated by &amp;amp;. So the code to update item 36 without notifications would be&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{project}/_apis/wit/workitems/36?suppressNotifications=true&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;api-version=7.0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="A send HTTO request to DevOps action with the suppressNotifications parameter added." class="gallery-image" data-flex-basis="292px" data-flex-grow="122" height="557" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/update-devops-without-notifications/2024-08-14_14-40-32-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="item-history"&gt;Item History
&lt;/h2&gt;&lt;p&gt;Suppressing the notifications does prevent automated updates filling inboxes with emails that will just get deleted. It does not however supress the history of the item being updated. So who did the update and when is still recorded.&lt;/p&gt;
&lt;p&gt;&lt;img alt="History of a work item showing the updates" class="gallery-image" data-flex-basis="502px" data-flex-grow="209" height="325" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/update-devops-without-notifications/2024-08-14_14-45-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Running a Wiql DevOps query in Power Automate</title><link>https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/</link><pubDate>Wed, 14 Aug 2024 11:55:17 +0000</pubDate><guid>https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/</guid><description>&lt;img src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/cover.png" alt="Featured image of post Running a Wiql DevOps query in Power Automate" /&gt;&lt;p&gt;Wiql stands for Work Item Query Language and is the language used to define the queries in Azure DevOps. Its has a very similar syntax to SQL. Power Automate can use a REST API send a query to DevOps to execute the query. This post post is part of the Power Automate and DevOps series.&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The full reference can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops&amp;amp;wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="writing-the-query"&gt;Writing the Query
&lt;/h2&gt;&lt;p&gt;You can write it by hand, and I’m sure some people do. I use the query tools in DevOps to build the query and then view the Wiql code. For this post the example we are going to is to assign all the items in a hierarchy to one person. For example all the items in the Design Shiny feature.&lt;/p&gt;
&lt;p&gt;&lt;img alt="List of items including a feature called Design Shiny that has 2 user stories and they have multiple tasks." class="gallery-image" data-flex-basis="372px" data-flex-grow="155" height="438" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-13_17-54-33.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="wiql-editor"&gt;Wiql Editor
&lt;/h3&gt;&lt;p&gt;Before we can work with WIQL we need to install the extension Wiql Playground in the organisation. You will need to be an organisation admin to do this. Head to the marketplace for Visual Studio, found here&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://marketplace.visualstudio.com/azuredevops" target="_blank" rel="noopener"
 &gt;Extensions for Visual Studio family of products | Visual Studio Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Search for wiql and click on the Wiql Editor. When the extension information page opens click on Get it free. Then on the next page, select the right organisation and click Download. It will now appear under boards in your project.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the market place showing the results of searching for wiql and then the header of the Wiql editor page showing the Get it free button. Then the select an organisation page with a download button and finally the Boards side menu showing Wiql Playground listed" class="gallery-image" data-flex-basis="377px" data-flex-grow="157" height="432" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-13_18-12-57.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="construct-query"&gt;Construct Query
&lt;/h3&gt;&lt;p&gt;Now in Queries construct the query. I am not here to teach you building queries in DevOps, there is a great post to get you started here &lt;a class="link" href="https://learn.microsoft.com/en-us/azure/devops/boards/queries/using-queries?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/azure/devops/boards/queries/using-queries&lt;/a&gt;. My query is a tree of work items, matching the top item first and only has 2 criteria of the top item is ID 17 and the child item is not closed or completed.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing how to get to the wiql of a query in DevOps" class="gallery-image" data-flex-basis="353px" data-flex-grow="147" height="462" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_08-57-50.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you have your query working and you have saved it you can view the Wiql. Click on the three dots in the top right. Then from the menu select Edit query wiql. This will open a pane containing the code that you can copy to your clipboard.&lt;/p&gt;
&lt;p&gt;Note you have to save after any changes for the changes to be in the Wiql code.&lt;/p&gt;
&lt;h2 id="running-the-wiql-in-power-automate"&gt;Running the Wiql in Power Automate
&lt;/h2&gt;&lt;p&gt;Now we have the Wiql code we can write the flow. The flow will have the parameters of the Parent Work Item ID and the email address to assign all the tasks to. We will then use a compose action to the Parent Work Item ID and Project name into the Wiql.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the flow with a manual trigger with a Parent Work Item ID as a parameter. Then a compose action with the Wiql code with the Project name environment variable and the Parent Work Item ID in the code" class="gallery-image" data-flex-basis="159px" data-flex-grow="66" height="1021" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_09-20-21.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next step is to run the query. The documentation for the REST API call can be found here &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query-by-wiql?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query-by-wiql&lt;/a&gt; The method is Post and the URI will be the same for all Wiql&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;_apis/wit/wiql?api-version=7.1-preview.2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The body is JSON with only one field query with the output from the compose action.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Send an HTTP request to Azure DevOps action with a Method of POST, the URI as above and the Body containing { “query” : “Compose Output” }" class="gallery-image" data-flex-basis="415px" data-flex-grow="173" height="393" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_09-42-46.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When we run the flow and enter in the Parent ID 17 and the email &lt;a class="link" href="mailto:Dan@lgb123.onmicrosoft.com" &gt;Dan@lgb123.onmicrosoft.com&lt;/a&gt; it executes and returns us the data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Run flow dialog with the 2 parameters populated and then the HTTP action successfully run showing the JSON Output of the wiql query" class="gallery-image" data-flex-basis="273px" data-flex-grow="113" height="597" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_09-46-52.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="handling-the-output-of-the-http-call"&gt;Handling the Output of the HTTP call
&lt;/h2&gt;&lt;p&gt;In the successful action we can click on Show raw output in the Outputs section to open a pane and explore the Json output. Scroll past the headers and then in the body section, past columns to find workItemRelations. This will list all the work items returned by the query, not their details, just the id and url in the target section.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The output code with workItemRelations and Target with Id highlighted" class="gallery-image" data-flex-basis="164px" data-flex-grow="68" height="990" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_11-53-29.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;To make this easy to work with we need to use a Parse JSON so copy all the output JSON and return to editing the flow. Add a Parse JSON step and add the Body returned by the HTTP to the Content. Next we need to add a schema, this can be generated. Click on Generate from sample. Then paste in the JSON you copied and click Done. And a schema will be added.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A parse json action showing the content and how to generate the schema" class="gallery-image" data-flex-basis="213px" data-flex-grow="88" height="766" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_11-45-40.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The output schema is now known to the flow. So we can use the output to loop through all the items and update the work items.&lt;/p&gt;
&lt;h2 id="looping-through-workitemrelations"&gt;Looping through workItemRelations
&lt;/h2&gt;&lt;p&gt;We can loop through the workItemRelations using an Apply to each action. The piece of information I want from each item is the target – id. So I add a compose and add the following expression&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;item()?[&amp;#39;target&amp;#39;]?[&amp;#39;id&amp;#39;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I would then test to make sure you get the number of items you expect and that the compose does return the ids you expect&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="275" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_12-32-25.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Finally we can add a step to assign each task to the email given in the parameter. I use a Send HTTP method rather than the Update a Work Item so I can as explained in a future post turn off notifications.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Added a send HTTP request to Azure DevOps to assign the task id from the compose step to the email " class="gallery-image" data-flex-basis="187px" data-flex-grow="78" height="869" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We can then run the flow and check the results in DevOps and see the tasks have been assigned.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="540px" data-flex-grow="225" height="302" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/2024-08-14_12-45-23.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;this was one example of using Wiql inside Power Automate. I have used it to duplicate hierarchies and delete a hierarchy. The skill comes in being able to write the Wiql to achieve what you need.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Using DevOps REST API in Power Automate</title><link>https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/</link><pubDate>Tue, 13 Aug 2024 16:37:38 +0000</pubDate><guid>https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/</guid><description>&lt;img src="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/cover.png" alt="Featured image of post Using DevOps REST API in Power Automate" /&gt;&lt;p&gt;DevOps REST API is a well documented API that we can easily use in Power Automate to perform a huge range of actions. The connector includes an action to make it easy. The API documentation can be found at&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/azure/devops&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this post we will take some simple examples to get you started. This is the third post in the DevOps and Power Automate series.&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;Its coming honest!&lt;/p&gt;
&lt;h2 id="get-task-details-using-devops-rest-api"&gt;Get Task Details using DevOps REST API
&lt;/h2&gt;&lt;p&gt;Power Automate includes an action to get the details of a Work Item. When we look we can see it has 4 required fields. Organization name, Project Name and Work Item Id are easy. We will have them. I had problems with Work Item Type, I didn’t always have that. So I looked to DevOps REST API for an alternative.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Get Work item details action showing the 4 required parameters with Work Item Type highlighted" class="gallery-image" data-flex-basis="632px" data-flex-grow="263" height="258" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/2024-08-11_18-12-59.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If we look in the documentation and then search for Get Work Item, you will find the syntax for fetching the details of one work item. The URL needs three pieces of information, shown in the {} brackets, organization, project and id. So no Work item type is required.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screenshot of the HTTP statement in the API documentation. Code is below" class="gallery-image" data-flex-basis="1371px" data-flex-grow="571" height="119" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/2024-08-11_18-17-44.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?wt.mc_id=DX-MVP-5003563" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We start with an instant flow. Then we add the a parameter to the trigger of the work item id. Then we add the action Send an HTTP request to Azure DevOps. The Organisation we can use our environment variable (or from the drop down). The method is GET. The Relative URI is everything after the organisation in the url we got from the documentation.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{project}/_apis/wit/workitems/{id}?api-version=7.2-preview.3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Manual trigger in a flow with a Work Item ID as a parameter followed by an action of Send an HTTP request to Azure DevOps" class="gallery-image" data-flex-basis="275px" data-flex-grow="114" height="593" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/2024-08-11_18-29-38.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When we run the flow, we get prompted to enter the number of a work item id. When it completes, we get returned the JSON of that work item details. If you need to extract information from that JSON, you will probably need a Parse JSON action. (Another post!)&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Rn flow requesting Work Item ID and the result action showing the body contains a JSON statement" class="gallery-image" data-flex-basis="346px" data-flex-grow="144" height="471" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/2024-08-11_18-29-12.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="update-a-work-item-using-devops-rest-api"&gt;Update a Work Item using DevOps REST API
&lt;/h2&gt;&lt;p&gt;We can update an item using the REST API. For this example the flow will update a given task to have the state Active and be assigned to the given email. So, we add Work Item ID and Email as two parameters to the trigger.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A flow with a Manual trigger showing 2 parameters Work Item ID and Email. An action of Send a HTTP request to Azure DevOps using a path method and updating the State and AssignedTo fields." class="gallery-image" data-flex-basis="164px" data-flex-grow="68" height="992" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/2024-08-12_16-34-04.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then we add a Send an HTTP request to Azure DevOps action. The Organisation is the same as before, the method is now Patch as we are updating data. The Relative URI is exactly the same as before. In the headers we need to add Content-Type and application/json-patch+json&lt;/p&gt;
&lt;p&gt;In the Body we need to add a JSON object that includes the fields we want to update. For this we need to know the field names, see the previous post in the series for ways to find them. It is just text so we can insert dynamic content, e.g. the email address. The above example picture and code below shows changing the State to Active and assigning it to the Email address&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;op&amp;#34;: &amp;#34;add&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;path&amp;#34;: &amp;#34;/fields/System.State&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;value&amp;#34;: &amp;#34;Active&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;op&amp;#34;: &amp;#34;add&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;path&amp;#34;: &amp;#34;/fields/System.AssignedTo&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;value&amp;#34;: &amp;#34;@{triggerBody()[&amp;#39;text_1&amp;#39;]}&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Rest API is a very powerful way to work with Azure DevOps and the action in Power Automate does make it very easy to use. It is worth having a test project to try out some of the options. Other posts will look at using Rest API to make changes without notifications and on behalf of another person. Also a bulk delete process, which needs a post of its own due to a few oddities.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate Update Fields in Azure DevOps</title><link>https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/</link><pubDate>Mon, 29 Jul 2024 08:09:46 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/cover.png" alt="Featured image of post Power Automate Update Fields in Azure DevOps" /&gt;&lt;p&gt;In a previous post we created items in DevOps. Although the Power Automate create item action had lots of fields, it did not have all the fields. This post shows you how to find the names for those fields and update fields in Azure DevOps using Power Automate.&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;Its coming 🙂&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The Problem
&lt;/h2&gt;&lt;p&gt;If you compare the fields available in a standard Epic item in DevOps with the fields available in Power Automate create work item action you will notice some fields are missing. The obvious missing ones being Start Date and Target Date and other fields like Business Value etc and any custom fields you’ve added will not be there so we need to update fields in Azure DevOps.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs of an Epic work item in DevOps and the DevOps Create a work item Power Automate action" class="gallery-image" data-flex-basis="480px" data-flex-grow="200" height="340" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/2024-07-26_11-14-53-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The observant ones amongst you will have noticed the Other Fields option in the Power Automate action. It wants a key for your field which is the name of the field. And guess what that name is not going to be StartDate. So our first job is finding that name.&lt;/p&gt;
&lt;h2 id="finding-field-names-v1"&gt;Finding Field Names v1
&lt;/h2&gt;&lt;p&gt;This is the first method and I think the simplest method. Start by creating an item in DevOps that has values in the fields you would like the names of. I’ve populated Effort, Business Value, Time Criticality, Start Date and Target Date.&lt;/p&gt;
&lt;p&gt;&lt;img alt="DevOps Epic work item with fields populated" class="gallery-image" data-flex-basis="329px" data-flex-grow="137" height="496" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/2024-07-26_11-35-06.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then in a Power Automate instant flow I add an action to get the work item details of that item, notice it is number 21. In the Get work item details I populate Org&lt;a class="link" href="#a040a142-03b1-4e20-a10b-8fe2427f8d11" &gt;1&lt;/a&gt;, Project, Type=”Epic” and Id=21. Then I run that flow and look at the outputs from that step.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="359px" data-flex-grow="149" height="454" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/2024-07-26_11-44-44.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If you scroll through the fields you will eventually find Business Value etc with their full field names. You need to replace the _ with . as I assume JSON objects to dots in field names. Note down the ones you need.&lt;/p&gt;
&lt;h2 id="create-work-item-and-update-fields-in-azure-devops"&gt;Create Work Item and Update Fields in Azure DevOps
&lt;/h2&gt;&lt;p&gt;Now we have the field names we can create a work item and populate those fields. Note the date formats are YYYY-MM-DDThh:mm:ssZ.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="203px" data-flex-grow="84" height="801" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/2024-07-26_13-11-22.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When this flow is run, it creates an item and will successfully update fields in Azure DevOps.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="334px" data-flex-grow="139" height="488" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/2024-07-26_13-22-58.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The Update a work item action has exactly the same Other fields option so you can use the same technique.&lt;/p&gt;
&lt;h2 id="find-field-names-v2"&gt;Find Field Names v2
&lt;/h2&gt;&lt;p&gt;Azure DevOps can be accessed via a Rest API&lt;a class="link" href="#6ef2c091-087e-46c5-8e21-2bba1d5c5562" &gt;2&lt;/a&gt; and this includes the list of fields available in a project. There is quite good documentation for this which can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/fields/list" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/fields/list&lt;/a&gt; . From the first code block on that post remove the GET and populate your org and project names. Then in a browser navigate to that url and it will return lots of JSON showing the definition of all the fields.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://dev.azure.com/{organization}/{project}/_apis/wit/fields
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="336px" data-flex-grow="140" height="485" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/2024-07-26_13-35-35.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then search for the fields you want and look for the referenceName and use that. As my project got complex I saved this data and then used Power Query to make a simple list of fields (perhaps a resource I should make public).&lt;/p&gt;
&lt;h2 id="conclusion-on-update-fields-in-azure-devops"&gt;Conclusion on Update Fields in Azure DevOps
&lt;/h2&gt;&lt;p&gt;The Other Fields section in Create and Update work item actions gives us the option to update items however we want to. Some fields of course are read only and updating some fields will update other fields, for example if you change the state to Closed it will then populate the Closed date field.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="footnotes"&gt;Footnotes
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;I’ve used environment variables to populate these as my flow is in a solution and I want to be able to move the solution to other environments or tenancies! &lt;a class="link" href="#a040a142-03b1-4e20-a10b-8fe2427f8d11-link" &gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Another blog post is coming to cover using Azure DevOps Rest api in Power Automate, I promise! &lt;a class="link" href="#6ef2c091-087e-46c5-8e21-2bba1d5c5562-link" &gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Connecting Power Automate to DevOps</title><link>https://hatfullofdata.blog/connecting-power-automate-to-devops/</link><pubDate>Thu, 25 Jul 2024 10:54:26 +0000</pubDate><guid>https://hatfullofdata.blog/connecting-power-automate-to-devops/</guid><description>&lt;img src="https://hatfullofdata.blog/connecting-power-automate-to-devops/cover.png" alt="Featured image of post Connecting Power Automate to DevOps" /&gt;&lt;p&gt;I know Azure DevOps from being on projects. Mostly for tracking tasks, sprints etc. I recently had to automate some item creation and editing across 1000s of tasks in DevOps. So I had to explore connecting Power Automate to DevOps for item creation and item editing. This is the first post I have in a long list of posts regarding DevOps with Power Automate and Power BI, welcome to my way of remembering how I did something.&lt;/p&gt;
&lt;h2 id="devops-with-power-automate-posts"&gt;DevOps with Power Automate posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Connecting Power Automate to Azure DevOps&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-update-fields-in-azure-devops/" target="_blank" rel="noopener"
 &gt;Updating Start and Due dates and other fields&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-devops-rest-api-in-power-automate/" target="_blank" rel="noopener"
 &gt;Using DevOps Rest API&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/running-a-wiql-devops-query-in-power-automate/" target="_blank" rel="noopener"
 &gt;Running a WIQL query&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/update-devops-without-notifications-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating items without Notifications&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-updates-on-behalf-of-another-with-power-automate/" target="_blank" rel="noopener"
 &gt;Updating a task on behalf of another person&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/snZdRzfuNIo" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/Power-Automate-Create-DevOps-Items-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="devops-connector"&gt;DevOps Connector
&lt;/h2&gt;&lt;p&gt;While editing a flow if you add action and search for DevOps you will find the Azure DevOps connector. If you look at the actions in the classic format&lt;a class="link" href="#65a785ed-7cea-41c5-b383-422365835ab1" &gt;1&lt;/a&gt; you will notice its a premium connector, i.e. you need a premium license. If you have not used this connector before it will prompt you to login. It assumes your DevOps login matches your Power Automate login.&lt;/p&gt;
&lt;p&gt;&lt;img alt="List of available actions for the DevOps connector which have the Premium label on and the dialog prompting you to Sign in if this is your first time using this connector." class="gallery-image" data-flex-basis="444px" data-flex-grow="185" height="367" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/2024-07-23_10-48-39.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="create-an-item"&gt;Create an item
&lt;/h2&gt;&lt;p&gt;Let’s start with a simple action to create a work item in a project. We start by adding the action Create a work item.&lt;/p&gt;
&lt;p&gt;The Organisation Name and the Project Name drop downs will contain the organisations and projects your login can see. (See further down about making this solution friendly). The Work Item Type drop down will contain all the types that the project allows from its process. The title is plain text and the Description is rich text, i.e. html.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Create a work item action dialog" class="gallery-image" data-flex-basis="438px" data-flex-grow="182" height="372" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/2024-07-23_10-55-59.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you test the flow you should get a work item created that matches the above.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Flow with green ticks showing it completed and a screen grab of the Epic work item created by the flow." class="gallery-image" data-flex-basis="632px" data-flex-grow="263" height="258" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/2024-07-23_17-35-09.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="troubleshoot-connecting-power-automate-to-devops"&gt;Troubleshoot Connecting Power Automate to DevOps
&lt;/h2&gt;&lt;p&gt;If the flow fails with an error regarding authorisation, you need to first check you are allowed to add an item in that project in DevOps. Then you need to check the organisation settings in DevOps. Look in Policies and make sure Third-party application access via OAuth is turned on.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Flow run showing the failure and then a screen grab of Organisation settings of Policies with Third-party application access via OAuth highlighted to allow connecting Power Automate to DevOps" class="gallery-image" data-flex-basis="422px" data-flex-grow="176" height="386" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/2024-07-23_17-43-58.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="advanced-options-in-create-an-item"&gt;Advanced Options in Create an Item
&lt;/h2&gt;&lt;p&gt;The Create a work item action includes advanced options, really they are just optional options. Two of the options are Link URL and Link Type. In this example I used the URL from the previously created item and the Type of Hierarchy-reverse to make this item a child of the previous item.&lt;/p&gt;
&lt;p&gt;Another option is the Assigned To field. I added my email so that when I look in the created item I see that it has been assigned to me.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the expanded create work item action with the Link URL and Link Type highlighted and the Assigned to highlighted. And screen grabs from the backlog showing the 2 related items and the Feature item with me assigned" class="gallery-image" data-flex-basis="303px" data-flex-grow="126" height="538" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/2024-07-23_18-03-39.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The first option is Return all fields, which the default is blank. This means the action returns all the item details when it successfully creates the item.&lt;/p&gt;
&lt;h2 id="making-it-solution-aware"&gt;Making it Solution Aware
&lt;/h2&gt;&lt;p&gt;If this flow is part of a solution that is going to move from a development environment to test and production, you will need to point the DevOps actions to the different Organisation and Project values. Thankfully the text values of the Organisation Name, e.g. HatFullOfData can be used.&lt;/p&gt;
&lt;p&gt;So I create 2 environment variables DevOps Organisation and DevOps Project. Then in the create a work item action, in Organisation Name and Project Name drop downs I select Custom Value and then the right value from Dynamic content.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of creating the environment variable, what it looks like in the dynamic content and finally using the environment variables for connecting Power Automate to DevOps" class="gallery-image" data-flex-basis="273px" data-flex-grow="113" height="597" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/connecting-power-automate-to-devops/2024-07-24_12-24-14.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;And yes of course after making these changes I test the flow again.&lt;/p&gt;
&lt;h2 id="conclusion-on-connecting-power-automate-to-devops"&gt;Conclusion on Connecting Power Automate to DevOps
&lt;/h2&gt;&lt;p&gt;For when you need to automate the creation of items, this is great. It does not replace importing an Excel file to create a whole plan but it does give an extra set of options to consider.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Foot Notes&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Yes in the new Power Automate experience, at the time of publishing this post, there are no premium labels on connectors or actions &lt;a class="link" href="#65a785ed-7cea-41c5-b383-422365835ab1-link" &gt;↩︎&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate – Create Power BI Workspace</title><link>https://hatfullofdata.blog/power-automate-create-power-bi-workspace/</link><pubDate>Fri, 21 Jun 2024 20:18:44 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-create-power-bi-workspace/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/cover.png" alt="Featured image of post Power Automate – Create Power BI Workspace" /&gt;&lt;p&gt;We’ve setup the service principal, saved the details securely in Azure Key Vault and used Power Automate to fetch them securely and finally setup the permissions to allow that service principal to use the rest api. This post will finally create the flow to automatically create Power BI workspace making use of all the preparation.&lt;/p&gt;
&lt;p&gt;This post is part of &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="start-the-flow-and-get-service-principal-details"&gt;Start the flow and get service principal details
&lt;/h2&gt;&lt;p&gt;There will be an instant flow using a manual trigger. Once the flow editor appears, expand the trigger and add a text input for the Workspace Name.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Build an instant cloud flow and then the trigger expanded to show the Workspace name input" class="gallery-image" data-flex-basis="642px" data-flex-grow="267" height="254" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-17_22-00-48.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The first action will be to call the child flow that fetches the tenantid, clientid and secret. Select Get Client Tenant and Secret flow from the dropdown and then use PBI-Workspace as the prefix value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Run a child flow action" class="gallery-image" data-flex-basis="600px" data-flex-grow="250" height="272" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-17_22-19-27.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="http-call-to-automatically-create-power-bi-workspace"&gt;HTTP Call to automatically create Power BI Workspace
&lt;/h2&gt;&lt;p&gt;FInally we can do the action to create Power BI workspace, for this we add a HTTP action. I’m going to break this down into 3 parts, the URI, the body and the authentication.&lt;/p&gt;
&lt;p&gt;&lt;img alt="HTTP action to create Power BI workspace" class="gallery-image" data-flex-basis="226px" data-flex-grow="94" height="719" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-18_11-18-49.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;From &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group#examples" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group#examples&lt;/a&gt; we can see the HTTP starts with POST so we pick that as the method. It also gives us the URI. To save you going to fetch it here it is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://api.powerbi.com/v1.0/myorg/groups?workspaceV2=True
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The next part is the body. This is a very simple piece of JSON with only one field name. Get the value of name to come from the trigger input Workspace name.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;name&amp;#34;: &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The final part is the authentication. Show the Advanced Options to see the boxes to fill in. Firstly Authentication is Active Directory OAuth. Then the Authority can be left blank. Next the Tenant, Client ID and Secret are dynamic values from running the child flow action. Finally the Audience should be the following&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://analysis.windows.net/powerbi/api
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Your flow is now ready to test. Hopefully when you do this it all works and you get green ticks. But when you go to Power BI the workspace is not listed in workspaces you can see. This is because the workspace was created by the service account, so the service account is the admin, not you. So the next step is to add a workspace admin.&lt;/p&gt;
&lt;h2 id="add-workspace-admin"&gt;Add Workspace Admin
&lt;/h2&gt;&lt;p&gt;This is going to require another HTTP call. So if we look at the second example show at &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/power-bi/groups/update-group-user#examples" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/power-bi/groups/update-group-user#examples&lt;/a&gt; we can see we need 2 pieces of information, the workspace ID and the email address of the workspace admin.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grab from the rest api documentation" class="gallery-image" data-flex-basis="591px" data-flex-grow="246" height="276" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-18_11-45-27.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The workspace ID must have been returned when we create Power BI workspace. If you look in the dynamic content it won’t be listed though so we need either code by hand or we use my favourite trick of Parse JSON.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the successful HTTP step with output body, and the Parse JSON action with the generate from sample button hghlighted" class="gallery-image" data-flex-basis="417px" data-flex-grow="173" height="391" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-18_11-56-01-1.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="get-the-workspace-id"&gt;Get the Workspace ID
&lt;/h3&gt;&lt;p&gt;Go to the test run you did and expand the HTTP call that created the workspace. In the Outputs section there is a Body section which will contain the JSON that was returned. Copy this JSON as this will help complete the Parse JSON.&lt;/p&gt;
&lt;p&gt;Then return to editing the flow and add a Parse JSON action. For the content use the Body returned by the HTTP action. JSON schemas are tricky to write by hand so you can generate it from what we copied. Click on the Generate from sample to open a dialog. Paste the output body we copied earlier and click Done. The Parse JSON step will now have a schema.&lt;/p&gt;
&lt;h3 id="request-the-admin-email"&gt;Request the Admin Email
&lt;/h3&gt;&lt;p&gt;The flow might not be run by the requester of the workspace, so it makes sense to ask for the admin’s email. Add this as an extra input in the trigger.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="549px" data-flex-grow="228" height="297" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-18_13-14-33.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="new-http-request-to-add-user"&gt;New HTTP Request to add User
&lt;/h3&gt;&lt;p&gt;&lt;img alt="HTTP step filled in as the instructions below" class="gallery-image" data-flex-basis="217px" data-flex-grow="90" height="750" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-18_13-22-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Add a new HTTP action, and I recommend renaming it. (Yes that should happen to the first one as well!). Again its a POST method and the URI needs id from the Parse JSON step slotted in. The Body is a simple JSON again. Code for both of these can be copied from below. The authentication is exactly the same as the previous HTTP step.&lt;/p&gt;
&lt;h4 id="uri"&gt;URI
&lt;/h4&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://api.powerbi.com/v1.0/myorg/groups//users
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h4 id="body"&gt;Body
&lt;/h4&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;emailAddress&amp;#34;: &amp;#34;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;groupUserAccessRight&amp;#34;: &amp;#34;Admin&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="conclusion-to-create-power-bi-workspace"&gt;Conclusion to Create Power BI Workspace
&lt;/h2&gt;&lt;p&gt;You should now have a complete flow that when run asks for Workspace Name and Admin Email and creates a workspace with the admin added.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Flow run box with parameters populated and the created workspace showing the Manage Access pane" class="gallery-image" data-flex-basis="725px" data-flex-grow="302" height="225" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-create-power-bi-workspace/2024-06-18_13-46-33.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This is the MVP of the solution. There are obvious additions such as approvals, notifying the new admin and other various extras that should be included. They may get blogged, lets see.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Allow the use of Power BI Rest APIs</title><link>https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/</link><pubDate>Mon, 17 Jun 2024 18:13:23 +0000</pubDate><guid>https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/</guid><description>&lt;img src="https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/cover.png" alt="Featured image of post Allow the use of Power BI Rest APIs" /&gt;&lt;p&gt;In the first 3 posts of this series we created Service Principal, stored the details in Azure key Vault and created a flow. We have one more step to do, we need to allow the use of Power BI Rest APIs in our tenancy and then we will be ready to actually set up the automation for creating workspaces.&lt;/p&gt;
&lt;p&gt;This post is part of &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="find-the-setting"&gt;Find the Setting
&lt;/h2&gt;&lt;p&gt;This setting can be found in the Admin portal for Power BI under Tenant settings, you need to be a Power BI admin. If you search for Fabric API you’ll find it quickly. If you click the enabled toggle to on it will give you 2 options. The entire organization would allow the use of Power BI Rest APIs by anyone if they had the right credentials, this would not be good practice. So I recommend selecting Specific security groups. This means the service principal needs to be a member of a security group.&lt;/p&gt;
&lt;p&gt;Tenant settings can be found at &lt;a class="link" href="https://app.powerbi.com/admin-portal/tenantSettings" target="_blank" rel="noopener"
 &gt;https://app.powerbi.com/admin-portal/tenantSettings&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Fabric APIs setting in " class="gallery-image" data-flex-basis="208px" data-flex-grow="86" height="784" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/2024-06-17_17-04-51.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="create-security-group"&gt;Create Security Group
&lt;/h2&gt;&lt;p&gt;To create a security group you will need the right level of security in Entra, in many organisations you will not. Go to &lt;a class="link" href="https://entra.microsoft.com/" target="_blank" rel="noopener"
 &gt;https://entra.microsoft.com/&lt;/a&gt; and click Groups on the left hand menu. Make sure you are looking at All Groups and then click New group.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="457px" data-flex-grow="190" height="357" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/2024-06-17_17-16-33.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The group type should be Security. Enter in a Group name, please follow any naming conventions you should be following. I highly recommend putting in a group description, future you will thank you. Click on No members selected to open the Add members pane. Search for the name of the service principal and tick next the name. Then click Select to close the pane.&lt;/p&gt;
&lt;p&gt;No members will now be updated to 1 member, so you can now click Create.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the details of creating a group and adding the service principal to the group." class="gallery-image" data-flex-basis="535px" data-flex-grow="222" height="305" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/2024-06-17_17-21-32.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="back-to-the-setting-to-allow-the-use-of-power-bi-rest-apis"&gt;Back to the setting to allow the use of Power BI Rest APIs
&lt;/h2&gt;&lt;p&gt;Now we have the security group setup we can change the setting to allow the use of Power BI Rest APIs. Back into Power BI admin portal and find the setting.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add specific security groups and click apply to allow the use of power BI rest APIs" class="gallery-image" data-flex-basis="213px" data-flex-grow="88" height="766" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/2024-06-17_17-39-26.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Enable the setting and select Specific security group. Then add your security group into the box, the search is pretty good in my experience. The click Apply.&lt;/p&gt;
&lt;h2 id="finally"&gt;Finally!
&lt;/h2&gt;&lt;p&gt;We have now ticked all the boxes, done all the prep to write a flow to create a workspace. The next post will be my final post in this series! (Well for now as I already have a few ideas for taking it further.)&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Use Power Automate to Fetch Secrets from Key Vault</title><link>https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/</link><pubDate>Wed, 29 May 2024 08:34:09 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/cover.png" alt="Featured image of post Use Power Automate to Fetch Secrets from Key Vault" /&gt;&lt;p&gt;Once you have stored security details in Azure Key Vault as described in the previous post in this series (&lt;a class="link" href="https://hatfullofdata.blog/create-azure-key-vault-to-store-tenant-id-client-id-and-secret/" target="_blank" rel="noopener"
 &gt;Create Azure Key Vault to store Tenant ID, Client ID and Secret&lt;/a&gt;) you need a way to fetch secrets when you need them. Power Automate connector for Azure Key Vault includes the Get Secret action. This post shows you how to build a reusable child flow to fetch secrets.&lt;/p&gt;
&lt;p&gt;This post is part of &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="flow-design"&gt;Flow design
&lt;/h2&gt;&lt;p&gt;The flow we are going to create will be called by other flows, so is a child flow. The flow will have one parameter of the prefix of the ClientID and Secret store in the Azure Key Vault. If you have completed the previous post this would be PBI–Workspace. It will return 3 values, TenantID, ClientID and Secret which will be secured&lt;/p&gt;
&lt;p&gt;&lt;img alt="List of Secrets ib Azure Key Vault with names PBI-Workspace-ClientID and PBI-Workspace-Secret" class="gallery-image" data-flex-basis="519px" data-flex-grow="216" height="314" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/image.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Because we are using child flows we need to create our flows inside a solution. I recommend creating a solution for these group of flows. I don’t want to make this blog post even longer so please go google creating Power Platform solutions.&lt;/p&gt;
&lt;h2 id="setting-up-the-trigger"&gt;Setting up the Trigger
&lt;/h2&gt;&lt;p&gt;For a child flow we use a instant flow. Type in a descriptive name and select the trigger Manually trigger a flow. When you are in the flow editor, expand the trigger and add an input for the prefix. Adding hint text will help you and other users remember what the input is about.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="645px" data-flex-grow="268" height="253" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/flow-trigger.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-actions-to-fetch-secrets"&gt;Adding Actions to Fetch Secrets
&lt;/h2&gt;&lt;p&gt;The flow is reasonably simple with three repeating actions to fetch secrets. Add an action and search for Key Vault and select it. Then from the list select Get Secret. If this is the first time you have connected to a Key Vault you will need to type in the key vault name and click Sign in. Be aware that every key vault has its own connection.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Azure Key Vault connection setup showing Authentication Type drop down which can be left on default and place to type in Key Vault name" class="gallery-image" data-flex-basis="497px" data-flex-grow="207" height="328" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-13_20-45-20.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The action has a very simple drop down. For the TenantID action you can just select it from the drop down. For the ClientID and Secret we want to the prefix value from the trigger so that this flow is reusable. So for the ClientID and Secret select Enter custom value. Then use the dynamic value Prefix followed by -ClientID and -Secret.&lt;/p&gt;
&lt;p&gt;&lt;img alt="three actions to fetch secrets from key vault" class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="451" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-13_22-12-50-1.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="securing-the-secret-value"&gt;Securing the Secret Value
&lt;/h2&gt;&lt;p&gt;The secret value should be kept secret. So the Action output needs securing. Click on the ellipse (3 dots) on the Get secret – Secret action. Turn on the toggle for Secure Outputs and then click Done at the bottom of the dialog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Menu showing settings and settings with toggle for Secure Outputs turned on" class="gallery-image" data-flex-basis="500px" data-flex-grow="208" height="326" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_21-29-11.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This could be done on ClientID as well if required. Each action that has a security setting applied will show a padlock. When a flow run execution is looked at the value of the secret will not be available.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Action with a padlock and the executed action showing Content not shown due to security configuration" class="gallery-image" data-flex-basis="266px" data-flex-grow="111" height="612" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_21-47-17.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="returning-the-values"&gt;Returning the Values
&lt;/h2&gt;&lt;p&gt;The final part for this flow is to return the values. And for this flow to run as a child flow it must have a respond action. Click on add action and search for the Power Apps connector. It only one has one action Respond to a Power App or flow. Add three outputs to return TenantID, ClientID and Secret.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power Apps connection showing Respond action and the action in the flow with three outputs" class="gallery-image" data-flex-basis="256px" data-flex-grow="106" height="636" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_22-13-18.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="handling-the-connections"&gt;Handling the Connections
&lt;/h2&gt;&lt;p&gt;When an instant flow runs the connections are usually based on who clicked the start on the flow. This does not work for a child flow, so a connection must be selected that will be used for when it runs.&lt;/p&gt;
&lt;p&gt;The changes need to be made from the flow details page, save and click the blue arrow in the top left to get there. Click on Edit in the Run only users box. When the pane appears, under connections used select a connection under Azure Key Vault. A message will appear to state users only get access in this flow, click OK to close it and then click Save to save the changes.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="766px" data-flex-grow="319" height="213" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-04-14_22-39-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="testing-the-flow"&gt;Testing the flow
&lt;/h2&gt;&lt;p&gt;When you first write a child flow I suggest you write an instant flow to test it. The Run a Child Flow action only is available if your flows are in a solution. In order to protect the secret value you also need to protect the outputs of the Run a Child flow action.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The flow with Manually trigger a flow trigger connected to Run a Child Flow action that is running Get Tenant and Secret with the parameter Prefix populated with PBI-Workspace" class="gallery-image" data-flex-basis="652px" data-flex-grow="272" height="250" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-to-fetch-secrets-from-key-vault/2024-05-29_09-17-35.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This tests that the flow runs a child flow and returns values even though we can’t see them.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;We now have an app that can fetch secrets, we’ve secured the authentication details and now written a flow to securely retrieve those values. Next step is to make sure Power BI will allow us to do this.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Create Azure Key Vault to store Tenant ID, Client ID and Secret</title><link>https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/</link><pubDate>Sat, 06 Apr 2024 20:14:00 +0000</pubDate><guid>https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/</guid><description>&lt;img src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/cover.png" alt="Featured image of post Create Azure Key Vault to store Tenant ID, Client ID and Secret" /&gt;&lt;p&gt;Azure Key Vault is a cloud service that provides a secure store for secrets. And in the previous post on creating &lt;a class="link" href="https://hatfullofdata.blog/create-a-power-bi-service-principle-profile/" target="_blank" rel="noopener"
 &gt;Power BI Service Principal Profile&lt;/a&gt; we added a secret. The Tenant ID, Client ID and Secret values give access to the Service Principal and whatever permission they have. So for that reason we are going to create an Azure Key Vault.&lt;/p&gt;
&lt;p&gt;This post is part of the &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="create-azure-key-vault"&gt;Create Azure Key Vault
&lt;/h2&gt;&lt;p&gt;The first step is to create the Azure Key Vault. Start at &lt;a class="link" href="https://portal.azure.com/" target="_blank" rel="noopener"
 &gt;https://portal.azure.com/&lt;/a&gt;. From the Home screen, navigate to all services and find Key Vaults. Once on the Key Vaults page click on Create to start the process. This will navigate you to a screen to select Subscription and Resource group. Key vaults do cost money, in my case
&lt;img alt="Steps to create an Azure Key Vault" class="gallery-image" data-flex-basis="442px" data-flex-grow="184" height="369" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-18_22-58-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-role-assignment"&gt;Add Role Assignment
&lt;/h2&gt;&lt;p&gt;Now we have create a new key vault to store our secrets the obvious place to go next is to Secrets. But if you take a look there you will see you do not have permission to play with secrets yet. And if you try to create one it will fail.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen shot showing the statement “You are unauthorized to view these contents”" class="gallery-image" data-flex-basis="491px" data-flex-grow="204" height="332" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-24_19-30-04.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You do have the rights to give yourself permission. On the left hand side menu, click on Access Control (IAM). Click on +Add and from the drop down options select Add role assignment.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Access control in the Key Vault" class="gallery-image" data-flex-basis="328px" data-flex-grow="136" height="497" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-24_20-04-04.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the next screen appears, we need to select a role based on Secrets. In the search box enter Secret and from the list select Key Vault Secrets Officer, that can read and write secrets. Click next to move to the Members tab. Click on + Select members and select yourself from the list and anyone else that needs access. When all the members are listed, click Review + Assign twice.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding members to the azure key vault role assignments" class="gallery-image" data-flex-basis="415px" data-flex-grow="173" height="393" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-24_20-18-23.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You can look at the list of role assignments or click on Check my access for confirmation. If you want a user to be able to read the secrets but not write them you would pick Key Vault Reader.&lt;/p&gt;
&lt;h2 id="add-secrets"&gt;Add Secrets
&lt;/h2&gt;&lt;p&gt;When we now head to Secrets on the left hand menu, there are no warnings about being unauthorized. Click on + Generate/Import to open the Create a secret form. Upload can stay as Manual, enter in a name and the value. For naming I will use a common start for the Client ID and Secret so that in the flow in the next post I only need to ask for one parameter.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Steps to add a secret" class="gallery-image" data-flex-basis="471px" data-flex-grow="196" height="346" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-azure-key-vault-to-store-id-and-secret/2024-02-25_14-16-37.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I also add a secret to store the Tenant ID. This probably doesn’t need to be as secure but it makes it easy if everything is in the same location.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I now have a key vault with 3 values. I can now use either environment variables or a flow to pull through the values. I can add more secrets to the vault for other Power BI actions.&lt;/p&gt;</description></item><item><title>Create a Power BI Service Principal Profile</title><link>https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/</link><pubDate>Sat, 17 Feb 2024 18:18:23 +0000</pubDate><guid>https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/</guid><description>&lt;img src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/cover.png" alt="Featured image of post Create a Power BI Service Principal Profile" /&gt;&lt;p&gt;For Power Automate to use the Power BI Rest API it needs a service principal profile. This is created by creating an app registration that has the right permissions. This allows an app, e.g. Power Automate, to establish a trust relationship with the Microsoft identity platform. This is done using Entra Admin Center (previously known as Active Directory)&lt;/p&gt;
&lt;p&gt;This post is part of the &lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="create-app-registration-for-service-principal"&gt;Create App Registration for Service Principal
&lt;/h2&gt;&lt;p&gt;Navigate to &lt;a class="link" href="https://entra.microsoft.com/" target="_blank" rel="noopener"
 &gt;https://entra.microsoft.com/&lt;/a&gt;. Then in the menu expand Identity and under that Applications. Finally click on App Registrations to open the list of App Registrations. It defaults to list registrations owned by you.&lt;/p&gt;
&lt;p&gt;&lt;img alt="App Registration list" class="gallery-image" data-flex-basis="528px" data-flex-grow="220" height="309" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/2024-02-11_18-49-28.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click on New registration to start creating your App registration. Enter a name for your application, remember to make clear as over time the list will grow. Leave rest of the options as default and press the Register button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Entering App Registration name and register" class="gallery-image" data-flex-basis="535px" data-flex-grow="222" height="305" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/2024-02-11_19-01-35.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="change-app-registration-ownership"&gt;Change App Registration Ownership
&lt;/h2&gt;&lt;p&gt;It is recommended that you add owners to the registration. Click on Owners, then click on Add Owners and select the owners. App owners and administrators can view and edit app registrations.&lt;/p&gt;
&lt;p&gt;&lt;img alt="list of app registration owners" class="gallery-image" data-flex-basis="528px" data-flex-grow="220" height="309" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/2024-02-11_19-41-28.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-api-permissions"&gt;Adding API Permissions
&lt;/h2&gt;&lt;p&gt;Permissions need to be given to the App Registration based on what you want to do. The Power BI Rest API documentation at &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group&lt;/a&gt; states you need Workspace.ReadWrite.All.&lt;/p&gt;
&lt;p&gt;Click on API Permissions and then click on Add a permission. When the list of APIs appear, select Power BI service. Then select Delegated permissions and from the list of permissions select Workspace.ReadWrite.All. It is good practice to only add the permissions you need.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding an API permission steps" class="gallery-image" data-flex-basis="518px" data-flex-grow="215" height="315" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/2024-02-11_20-12-40.png" width="680"&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;			## Adding a Secret
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The final step in App Registration is to add a secret. This will be required by anyone using the app registration.&lt;/p&gt;
&lt;p&gt;Click on Certificates &amp;amp; secrets, then click on New client secret. Enter in a description, I chose to keep the default 6 months expiration. Click Add to finish creating the secret.&lt;/p&gt;
&lt;p&gt;Once the list appears you must copy the secret value. This is the only chance you get.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding a secret to the service principal profile" class="gallery-image" data-flex-basis="413px" data-flex-grow="172" height="395" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/2024-02-11_20-38-15.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="important-information"&gt;Important Information
&lt;/h2&gt;&lt;p&gt;You will need the Secret value copied from the last section and the Tenant ID and Client ID. The final 2 values can be found by clicking on Overview. These values especially the secret need to be kept secure. So the next post is how to create an Azure Key Vault to store the values.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Finding the Client ID and Tenant ID" class="gallery-image" data-flex-basis="384px" data-flex-grow="160" height="424" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/create-a-power-bi-service-principal-profile/2024-02-11_21-07-52.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Understanding how App Extensions and Service Principals work is very useful not only for Power BI Rest api. The Microsoft Graph api can also be accessed using a service principal but that is a whole different series.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate and Power BI Rest API</title><link>https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/</link><pubDate>Thu, 15 Feb 2024 14:28:37 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/cover.png" alt="Featured image of post Power Automate and Power BI Rest API" /&gt;&lt;p&gt;The Power BI Rest API provides the ability to create a workspace. Power Automate includes an action to make a HTTP call, i.e. a Rest API. So we should be able to get a flow to create a workspace. So that was my goal. Writing the first flow and getting it to work involved so many little steps I had to write blog posts so I would remember the steps.&lt;/p&gt;
&lt;h2 id="power-bi-rest-api-documentation"&gt;Power BI Rest API Documentation
&lt;/h2&gt;&lt;p&gt;The documentation refers to workspaces as groups and can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group&lt;/a&gt;. It states that the API can be called by a service principal profile and the required scope is Workspace.ReadWrite.All.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot from the Power BI rest api documentation" class="gallery-image" data-flex-basis="301px" data-flex-grow="125" height="542" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/2024-02-17_17-34-46.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="other-settings"&gt;Other Settings
&lt;/h2&gt;&lt;p&gt;You also need to make some changes to Power BI tenant settings as well and I’d recommend creating a security group and using Azure Key Vault to store the credentials. That would make a very long blog post so I’m breaking it down into separate posts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/create-a-power-bi-service-principle-profile/" target="_blank" rel="noopener"
 &gt;Create a Power BI Service Principal Profile&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/create-azure-key-vault-to-store-tenant-id-client-id-and-secret/" target="_blank" rel="noopener"
 &gt;Create Key Vault to store Tenant ID, Client ID and Secret&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/use-power-automate-to-fetch-secrets-from-key-vault/" target="_blank" rel="noopener"
 &gt;Write a flow to fetch the Key Vault Values&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/allow-the-use-of-power-bi-rest-apis/" target="_blank" rel="noopener"
 &gt;Update Power BI Settings and Create a Security Group&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Write a flow to create the workspace&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Extras for the workspace&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="final-power-automate-flow"&gt;Final Power Automate Flow
&lt;/h2&gt;&lt;p&gt;The final flow, after post 5, fetches the Service Principal credentials using a child flow, then uses HTTP action to create the workspace and with a bit of parse json action magic uses another HTTP action to change the permissions.&lt;/p&gt;
&lt;p&gt;&lt;img alt="5 step flow as described in the previous paragraph" class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="452" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/2024-06-18_14-19-17.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The above flow has flaws, no error handling, no checking the workspace name is allowed and no notifying the admin they have a new workspace.&lt;/p&gt;
&lt;h2 id="next-steps"&gt;Next Steps
&lt;/h2&gt;&lt;p&gt;This is a simple example of using Power Automate with Power BI rest API to perform some admin tasks. This could easily be extended to include other boring admin tasks.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Microsoft Fabric – Notebook and Data Wrangler</title><link>https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/</link><pubDate>Mon, 13 Nov 2023 16:22:16 +0000</pubDate><guid>https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/</guid><description>&lt;p&gt;Before I started with Microsoft Fabric I had never created a spark notebook. This doesn’t stop me though. By using a combination of Notebook and Data Wrangler means I can transform data and write to table writing very little code by hand.&lt;/p&gt;
&lt;h2 id="microsoft-fabric-quick-guides"&gt;Microsoft Fabric Quick Guides
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-a-lakehouse/" target="_blank" rel="noopener"
 &gt;Create a Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-upload-a-file-and-folder/" target="_blank" rel="noopener"
 &gt;Load CSV file and folder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-table-from-csv-file/" target="_blank" rel="noopener"
 &gt;Create a table from a CSV file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/" target="_blank" rel="noopener"
 &gt;Create a Table with a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/" target="_blank" rel="noopener"
 &gt;Create a Table using a Notebook and Data Wrangler&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exploring the SQL End Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Power BI Report&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Paginated Report&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/tE-eCnlvY9k" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/Microsoft-Fabric-Notebook-and-Data-Wrangler-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="create-and-rename-a-notebook"&gt;Create and rename a Notebook
&lt;/h2&gt;&lt;p&gt;Inside the Lakehouse, on the ribbon drop down Open notebook and select New notebook. This will create an empty notebook with a default name. We can rename the notebook by clicking on the down arrow next to the name and entering a new name.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Open notebook menu showing New notebook and the drop down from the notebook name to rename the notebook." class="gallery-image" data-flex-basis="637px" data-flex-grow="265" height="256" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_14-57-03.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-a-markdown-title-cell"&gt;Adding a Markdown Title cell
&lt;/h2&gt;&lt;p&gt;Notebooks use 2 different types of cells, Code and Markdown. The Markdown cells allow for documentation to be included in the notebook. Any cell in the notebook can be converted into a Markdown cell. Below are screen grabs of converting the default cell into a Markdown cell, by clicking on the M button so giving a title cell to the notebook.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs showing the default block to be edited to show a heading 1 of Load Products table." class="gallery-image" data-flex-basis="338px" data-flex-grow="141" height="482" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_15-04-37.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Markdown includes syntax for lots of different text formatting. A good reference can be found at &lt;a class="link" href="https://www.markdownguide.org/basic-syntax/" target="_blank" rel="noopener"
 &gt;https://www.markdownguide.org/basic-syntax/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="load-the-file-into-a-data-frame"&gt;Load the file into a data frame
&lt;/h2&gt;&lt;p&gt;Notebooks use data frames to handle blocks of data. The next task is to load a csv file. On the left hand side select Files to list the right file. Then on the Products.csv, click on the three dots menu. Next select Load data and then Spark. This will add a new code cell to the notebook.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the selected file menu and the Load data, Spark options. And below the code block that is created" class="gallery-image" data-flex-basis="454px" data-flex-grow="189" height="359" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_15-11-43.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="run-a-code-cell"&gt;Run a code cell
&lt;/h2&gt;&lt;p&gt;Each code cell has a blue arrow on the left, clicking this runs the code in the cell. The function display lists the data frame contents below the code cell. Being able to run each cell in turn really helps with development. There is a run all option on the toolbar.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot showing the code block with the run arrow on the left hand side and showing the results" class="gallery-image" data-flex-basis="432px" data-flex-grow="180" height="377" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_15-17-36.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We can limit the display function to only list a few lines by using a method on the data frame called take. df.take(4) just returns 4 rows of data. Another method that is useful to examine a dataframe is dtypes. This returns all the datatypes of the data frame. So I edit the code and re-run the cell.&lt;/p&gt;
&lt;p&gt;&lt;img alt="modified code to only show 4 lines and show the datatypes" class="gallery-image" data-flex-basis="545px" data-flex-grow="227" height="299" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_15-21-03.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="data-wrangler"&gt;Data Wrangler
&lt;/h2&gt;&lt;p&gt;Before I can write the data frame to a table there are transformations that need to be done. Firstly there are spaces in some of the column names. Next the ID and Price columns need to be numbers rather than strings. Finally I do not want to include the Notes column.&lt;/p&gt;
&lt;p&gt;I could do the searches and find the Spark code to do those transforms. There is an alternative introduced in Microsoft Fabric called Data Wrangler. This will write the code for the three changes we need. We launch Data Wrangler from the Data ribbon – Transform Data Frame in Data Wrangler. This will list your data frames – which means you need to have run the cell that populates the dataframe first. Then we get to see the Data Wrangler screen.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data ribbon showing how to select the dataframe and a screen grab of the Data Wrangler" class="gallery-image" data-flex-basis="608px" data-flex-grow="253" height="268" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_15-57-04.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="rename-columns"&gt;Rename Columns
&lt;/h2&gt;&lt;p&gt;Product ID column needs to be renamed. Clicking on the three dots on the Product ID column heading. Then select rename column and the Operations pane changes to show rename options. Enter the new name Product_ID and the data pane will update to show the old in red and the new in green. Finally click Apply to save the changes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing how to change column names in Data Wrangler." class="gallery-image" data-flex-basis="547px" data-flex-grow="228" height="298" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_15-58-43.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The same needs to be done on the Base Price column to change it to Base_Price.&lt;/p&gt;
&lt;h2 id="changing-column-types"&gt;Changing Column Types
&lt;/h2&gt;&lt;p&gt;The next requirement is to change the column data types. This is very similar to renaming and can be found on the column heading menu. I change the Product_ID column to Int64 and the Base_Price column to Float64.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab showing the change column type options." class="gallery-image" data-flex-basis="491px" data-flex-grow="204" height="332" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_16-02-19.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="dropping-a-column"&gt;Dropping a column
&lt;/h2&gt;&lt;p&gt;Finally we need to drop the Notes column. Again this is found on the column header menu.&lt;/p&gt;
&lt;p&gt;&lt;img alt="dropping a column" class="gallery-image" data-flex-basis="658px" data-flex-grow="274" height="248" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_16-06-07.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-data-wrangler-code-to-notebook"&gt;Add Data Wrangler code to Notebook
&lt;/h2&gt;&lt;p&gt;Once we have finished all the transformations we are ready to add the code into the notebook. Click on the Add code to notebook. When the dialog appears, check the code and click Add.&lt;/p&gt;
&lt;p&gt;&lt;img alt="the ribbon in data wrangler showing Add code to notebook and the dialog to confirm adding the code" class="gallery-image" data-flex-basis="279px" data-flex-grow="116" height="583" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_16-11-50.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="run-the-data-wrangler-code"&gt;Run the Data Wrangler code
&lt;/h2&gt;&lt;p&gt;When the new code cell appears, we can see it ends by creating a new data frame df_clean and displaying it. So if we run the code we can see the result of the transformations.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Executing the transformation code" class="gallery-image" data-flex-basis="372px" data-flex-grow="155" height="438" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_16-12-59.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="write-data-frame-to-a-table"&gt;Write data frame to a table
&lt;/h2&gt;&lt;p&gt;After the transformation code has run, the data frame is ready to be saved into a table. This is the single line of code we have write by hand. A data frame has a write method which accepts format and mode options. Using Ctrl + Spacebar will get the autocomplete to help. Here is the required code.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Final code block with the save to table code" class="gallery-image" data-flex-basis="954px" data-flex-grow="397" height="171" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_16-58-02.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Save df_clean to a table called Products
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;df_clean.write.format(&amp;#34;delta&amp;#34;).mode(&amp;#34;overwrite&amp;#34;).saveAsTable(&amp;#34;Products&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Once the code has run successfully, we can look in the Lakehouse and see the new table products.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The new products table in the Lakehouse" class="gallery-image" data-flex-basis="788px" data-flex-grow="328" height="207" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/2023-11-12_16-58-50.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;For the newcomer, notebooks are daunting. With the addition of Data Wrangler we have a tool to help write the transformation code. One quote I heard was Data Wrangler is the Power Query tool for notebooks. I have yet to work out when I would use a notebook over a dataflow but I’m assuming there will be pros and cons that vary depending on the data involved.&lt;/p&gt;</description></item><item><title>Microsoft Fabric – Create tables with Dataflows</title><link>https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/</link><pubDate>Fri, 10 Nov 2023 09:09:14 +0000</pubDate><guid>https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/</guid><description>&lt;p&gt;As part of Microsoft Fabric, we have new Gen2 Dataflows and they have a new ability. A Gen2 Dataflow entity can have a destination. This means using a dataflow we can create a table in Fabric from another source, such as a folder of files.&lt;/p&gt;
&lt;h2 id="microsoft-fabric-quick-guides"&gt;Microsoft Fabric Quick Guides
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-a-lakehouse/" target="_blank" rel="noopener"
 &gt;Create a Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-upload-a-file-and-folder/" target="_blank" rel="noopener"
 &gt;Load CSV file and folder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-table-from-csv-file/" target="_blank" rel="noopener"
 &gt;Create a table from a CSV file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/" target="_blank" rel="noopener"
 &gt;Create a Table with a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/" target="_blank" rel="noopener"
 &gt;Create a Table using a Notebook and Data Wrangler&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exploring the SQL End Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Power BI Report&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Paginated Report&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/iiEx-47Ptr8" target="_blank" rel="noopener"
 &gt;&lt;img alt="thumbnail from YouTube" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/Microsoft-Fabric-Create-a-table-using-a-Dataflow-Time-0_00_00001.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="creating-gen2-dataflows"&gt;Creating Gen2 Dataflows
&lt;/h2&gt;&lt;p&gt;Open the Lakehouse and then from the Get data drop down on the Home ribbon select New Dataflow Gen2. This will create an empty dataflow with a default name. Clicking on the name in the top left, then a pop-up appears allowing you to change the name.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the get data drop down and the drop down when you click on" class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="275" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-06_21-34-49.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;For this blog post we are going to load the csv files in Sales folder, loaded in an earlier post and video. The files have been loaded into the Lakehouse so the data source is OneLake. In the Power Query window, on the Home ribbon, click Get data. From the menu that appears, we select More.. When the Choose data source appears, the bottom half lists OneLake sources, select the Lakehouse.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the menu on Get Data and the Choose data source dialog." class="gallery-image" data-flex-basis="613px" data-flex-grow="255" height="266" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-06_21-43-22.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the Choose data appears navigate to find the Sales folder. Then click Create. After a few moments a query will appear showing a row for every file in the folder.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="591px" data-flex-grow="246" height="276" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-06_21-54-48.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Power Query includes a feature to combine files, it requires the Content column to be binary. On the Content column, click on the datatype ABC/123 in the top left of the column and select binary. This will give you a column of binary&lt;/p&gt;
&lt;p&gt;&lt;img alt="Content column data type selection with binary highlighted and the final result of Content column full of Binary objects." class="gallery-image" data-flex-basis="341px" data-flex-grow="142" height="478" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-09_15-12-17.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The Content column is now the correct data type to combine the files. When you click on the top right icon it will start creating the helper queries to do the file combining. It will open a combine files dialog, showing you the content of the first file. When you click OK it will build the helper queries and the Sales query will now show the data from the files appended.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the Queries pane with the helper queries and the Sales query and the data" class="gallery-image" data-flex-basis="615px" data-flex-grow="256" height="265" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-09_15-35-22.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="fixing-the-date-column"&gt;Fixing the date column
&lt;/h2&gt;&lt;p&gt;The CSV files contains dates in American format, MM/DD/YYYY. The dataflow is looking for dates in my format DD/MM/YYYY so makes the date column string format. This needs fixing before saving to a table.&lt;/p&gt;
&lt;p&gt;Click on the ABC in the top left of the Order Date column. Then from the data type options select Using locale. When the dialog appears, I select Date for the data type and the English (United States) for the locale. When I click okay it changes the strings into dates. This feature is awesome and probably deserves a post of its own!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs showing the path from a column of dates as a string to dates in date format" class="gallery-image" data-flex-basis="591px" data-flex-grow="246" height="276" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-09_15-50-42.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="adding-a-destination"&gt;Adding a Destination
&lt;/h2&gt;&lt;p&gt;Now the data is ready we can set up the destination. In the bottom right of the screen it shows Data Destination and should show No data destination.&lt;/p&gt;
&lt;p&gt;Click on the plus next to Data destination and from the options select Lakehouse. You will get a connections window appear and you can just click Next. Then the next step asks you to select which workspace and then which container in that workspace. Once you have selected the right place you can update the Table Name. Now you are ready to click Next.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the steps from clicking the plus right through to selecting the container in the workspace." class="gallery-image" data-flex-basis="386px" data-flex-grow="161" height="422" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-09_16-02-57.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The last step update method and column mapping. The update method is a choice between adding data to the bottom of the table, Append, or overwriting the data, Replace. We are going to use Replace in this instance. The column mapping takes the columns from the query and tries to use those for column name. Column names can only contain letters, numbers and underscores. So if you have column names that don’t fit that it offers to fix that. Once you are happy click Save Settings&lt;/p&gt;
&lt;p&gt;&lt;img alt="Choose destination settings last step showing options for Update method with Replace selectes" class="gallery-image" data-flex-basis="422px" data-flex-grow="176" height="386" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-09_16-05-50.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="publishing-and-refreshing"&gt;Publishing and Refreshing
&lt;/h2&gt;&lt;p&gt;Now we have a query that shapes our data and we have a destination set up we can Publish the dataflow. This will save the dataflow and will refresh it. If you wanted to just save the dataflow and not refresh you can click the arrow next to Publish and select Publish later.&lt;/p&gt;
&lt;p&gt;Once the refresh has completed, we can open the Lakehouse and see the new Sales table has been created.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Explorer window on the left showing the list of tables inclu" class="gallery-image" data-flex-basis="590px" data-flex-grow="246" height="276" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/2023-11-09_16-48-25.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="gen2-dataflows-conclusion"&gt;Gen2 Dataflows Conclusion
&lt;/h2&gt;&lt;p&gt;Dataflows having a destination to write to is an exciting update. Power Platform has dataflows that can write to Dataverse but they have more issues than I’m willing to list here. Probably 90% of the transformations you need in Dataflows you can do by clicking rather than writing M. So this is mostly a low-code solution for getting data into Fabric. A later post will talk about how to handle not just overwriting the table.&lt;/p&gt;</description></item><item><title>Microsoft Fabric – Create table from CSV file</title><link>https://hatfullofdata.blog/fabric-create-table-from-csv-file/</link><pubDate>Thu, 09 Nov 2023 08:41:51 +0000</pubDate><guid>https://hatfullofdata.blog/fabric-create-table-from-csv-file/</guid><description>&lt;p&gt;In a previous post we uploaded a csv file into the Lakehouse. In this post we take the next step to create table from csv file loaded into the Lakehouse. This is the simplest method to create a table and requires no coding. The simplicity means that there are limitations.&lt;/p&gt;
&lt;h2 id="microsoft-fabric-quick-guides"&gt;Microsoft Fabric Quick Guides
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-a-lakehouse/" target="_blank" rel="noopener"
 &gt;Create a Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-upload-a-file-and-folder/" target="_blank" rel="noopener"
 &gt;Load CSV file and folder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-table-from-csv-file/" target="_blank" rel="noopener"
 &gt;Create a table from a CSV file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/" target="_blank" rel="noopener"
 &gt;Create a Table with a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/" target="_blank" rel="noopener"
 &gt;Create a Table using a Notebook and Data Wrangler&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exploring the SQL End Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Power BI Report&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Paginated Report&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/8PgeAhtK1c0" target="_blank" rel="noopener"
 &gt;&lt;img alt="thumbnail from YouTube video" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-table-from-csv-file/Microsoft-Fabric-Create-table-from-csv-file-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="create-table-from-csv-file"&gt;Create Table from CSV file
&lt;/h2&gt;&lt;p&gt;From within the Lakehouse, navigate to view the filename of the file you want to load into a table. Click on the 3 dots next to the filename. Then click on the arrow next to Load to Tables and select New table. When the next dialog appears, by default the table name will match the csv file name in lowercase. The name can be updated. Tick or untick the box regarding the headers, and click Load.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs showing the filename with 3 dot menu highlighted and the popup menu and below that the Load file to new table dialog box" class="gallery-image" data-flex-basis="243px" data-flex-grow="101" height="671" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-table-from-csv-file/2023-11-05_14-25-46.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After a short while the new table will appear in the Explorer pane. When you click on the table name, a preview will appear.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Explorer pane showing the table customers that has been selected so on the right a snapshot of 6 rows of data." class="gallery-image" data-flex-basis="741px" data-flex-grow="309" height="220" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-table-from-csv-file/2023-11-05_15-36-28.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="limitations"&gt;Limitations
&lt;/h2&gt;&lt;p&gt;This method of creating a table leaves the determination of column type to the process. So we have no control of that. For some files this will cause an issue. To avoid any issue on the date format I made sure the date format was YYYY-MM-DD.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Explorer pane showing the customers table expanded to show the column names and types" class="gallery-image" data-flex-basis="207px" data-flex-grow="86" height="473" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-table-from-csv-file/2023-11-05_16-20-55.png" width="408"&gt;&lt;/p&gt;
&lt;p&gt;You can see what the column types are in the table by clicking on the arrow next to the table name to expand it.&lt;/p&gt;
&lt;p&gt;You cannot change the column types from this view. The table is stored in delta format and clicking on the 3 dots menu will give you options to explore the properties and view the actual files that contain the data.&lt;/p&gt;
&lt;h2 id="updating-a-table"&gt;Updating a Table
&lt;/h2&gt;&lt;p&gt;When selecting to load into a table and selecting Existing table instead of New table will give a slightly different dialog box. You need to select the table and then select if the file data is to be appended or will overwrite the existing data. Be aware there is no undo.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Load file to existing table dialog with the radio buttons to Append or Overwrite highlighted." class="gallery-image" data-flex-basis="261px" data-flex-grow="108" height="625" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-table-from-csv-file/2023-11-05_16-34-37.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;For a clean, well structured CSV file, this is a great place to start. With a slow moving dimension table this could be a good solution as it just requires maintaining a csv file. For more complex files that require transformation there are better methods such as a dataflow or a notebook.&lt;/p&gt;</description></item><item><title>Microsoft Fabric – Upload a CSV file and folder</title><link>https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/</link><pubDate>Tue, 07 Nov 2023 16:50:43 +0000</pubDate><guid>https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/</guid><description>&lt;p&gt;The simplest way to add data to a Lakehouse is upload a csv file. In this blog post we will upload a csv file and upload a folder of csv files. You can upload other file types, but they take more work than csv files to quickly load into tables.&lt;/p&gt;
&lt;h2 id="microsoft-fabric-quick-guides"&gt;Microsoft Fabric Quick Guides
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-a-lakehouse/" target="_blank" rel="noopener"
 &gt;Create a Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-upload-a-file-and-folder/" target="_blank" rel="noopener"
 &gt;Load CSV file and folder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-table-from-csv-file/" target="_blank" rel="noopener"
 &gt;Create a table from a CSV file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/" target="_blank" rel="noopener"
 &gt;Create a Table with a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/" target="_blank" rel="noopener"
 &gt;Create a Table using a Notebook and Data Wrangler&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exploring the SQL End Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Power BI Report&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Paginated Report&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/CnQkB-aK6B8" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/Fabric-Upload-File-and-Folder-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="upload-a-csv"&gt;Upload a CSV
&lt;/h2&gt;&lt;p&gt;We open the Lakehouse, see previous post on how to create one. Then in the Explorer pane on the left next to Files and click on the three dots. On the popup menu click on Upload and then Upload files. When the pane appears on the right, click on the folder icon in the input box. Once you’ve selected the file, click the Upload button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of Explorer menu and the popup menu and the Upload files pane." class="gallery-image" data-flex-basis="788px" data-flex-grow="328" height="207" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/2023-11-01_08-49-08.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once the file is uploaded it can be found by clicking on Files. If you click on the file it the content will be displayed.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of Files showing customer.csv file loaded and then showing the file content" class="gallery-image" data-flex-basis="977px" data-flex-grow="407" height="167" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/2023-11-01_08-58-18.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Multiple files could have been selected to be uploaded at the same time. All the files would have been uploaded into the same location.&lt;/p&gt;
&lt;h2 id="upload-a-folder-of-files"&gt;Upload a Folder of Files
&lt;/h2&gt;&lt;p&gt;Uploading a folder is very similar to uploading a single file. In the explorer pane on the left, click on the three dots next to File, or a subfolder and select Upload. Then select Upload folder and the Upload folder pane will appear on the right. Clicking on the folder icon will allow you to select a folder. Finally you can click Upload and you will a progress line for every file in the folder.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grans showing the path from select upload folder to a list successful uploads" class="gallery-image" data-flex-basis="487px" data-flex-grow="202" height="335" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/2023-11-02_20-43-19.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The list of files that have been uploaded can be seen by clicking on the folder name in the explorer pane on the left&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grab showing the folder name selected and the files listed in the main area" class="gallery-image" data-flex-basis="420px" data-flex-grow="175" height="388" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/2023-11-02_20-47-05.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="updating-a-file-or-folder"&gt;Updating a File or Folder
&lt;/h2&gt;&lt;p&gt;Data is rarely the same forever so you will want to upload an updated file or folder. If you select a file or folder that already exists you will not be able to click the upload button unless you tick the Overwrite if files already exist.&lt;/p&gt;
&lt;p&gt;&lt;img alt="2 screen grabs of the Upload files pane. The first showing an error message of the following files already exist and the Upload button disabled. Second one with the Overwrite if files exist box ticked and the Upload button enbaled. " class="gallery-image" data-flex-basis="267px" data-flex-grow="111" height="610" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-upload-a-csv-file-and-folder/2023-11-02_21-02-51.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Manually uploading files and folders is not a great solution for a large number of files but it is a good place to start. The OneLake app will be a great alternative when its fully available and using pipelines to orchestrate file management is also a good alternative and future posts will cover both.&lt;/p&gt;</description></item><item><title>Microsoft Fabric – Create a Lakehouse</title><link>https://hatfullofdata.blog/fabric-create-a-lakehouse/</link><pubDate>Thu, 02 Nov 2023 22:43:20 +0000</pubDate><guid>https://hatfullofdata.blog/fabric-create-a-lakehouse/</guid><description>&lt;p&gt;Lakehouses are one of the main building blocks in Microsoft Fabric. A lakehouse allows you to store structured and unstructured data in a single location. In this post we are going to create an empty one. Future posts will populate it.&lt;/p&gt;
&lt;h2 id="microsoft-fabric-quick-guides"&gt;Microsoft Fabric Quick Guides
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-a-lakehouse/" target="_blank" rel="noopener"
 &gt;Create a Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-upload-a-file-and-folder/" target="_blank" rel="noopener"
 &gt;Load CSV file and folder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/fabric-create-table-from-csv-file/" target="_blank" rel="noopener"
 &gt;Create a table from a CSV file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-create-tables-with-dataflows/" target="_blank" rel="noopener"
 &gt;Create a Table with a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-fabric-notebook-and-data-wrangler/" target="_blank" rel="noopener"
 &gt;Create a Table using a Notebook and Data Wrangler&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exploring the SQL End Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Power BI Report&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Paginated Report&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/Rafh8RRBrj8" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-a-lakehouse/Fabric-Create-a-Lakehouse-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="empty-workspace-with-a-fabric-capacity"&gt;Empty Workspace with a Fabric Capacity
&lt;/h2&gt;&lt;p&gt;We start in an empty workspace that has a capacity assigned to it. A jewel logo next to the workspace name or checking the workspace settings are indicators that it has a capacity. A premium per user capacity does not include all Fabric features.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Workspace title with a jewel logo and a screen shot of the premium workspace settings highlighting Fabric and Trial capacity options" class="gallery-image" data-flex-basis="414px" data-flex-grow="172" height="394" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-a-lakehouse/2023-10-23_20-42-18.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="create-a-lakehouse"&gt;Create a Lakehouse
&lt;/h2&gt;&lt;p&gt;There are two ways to start creating a lakehouse. First method is to click New in the top left of the workspace area, by default it shows Power BI options so click on More options. When the screen updates, on the second row is Lakehouse.&lt;/p&gt;
&lt;p&gt;&lt;img alt="showing the dropdown from the New button with More options highlighted and a screen grab of the new screen with Lakehouse button highlighted." class="gallery-image" data-flex-basis="630px" data-flex-grow="262" height="259" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-a-lakehouse/2023-10-23_20-55-22.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The second option is switch the experience in the bottom left of the screen to show all the Experiences. When the menu pops up, select Data Engineering. Then the screen will update and show a slightly different Lakehouse button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab showing the experience button and the menu of expereinces with Data Engineering highlighted and an arrow pointing at a screen grab of the Lakehouse button" class="gallery-image" data-flex-basis="703px" data-flex-grow="293" height="232" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-a-lakehouse/2023-10-23_21-01-17.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next step in the create a lakehouse process is to name the lakehouse. The name can only include letters, numbers, and underscore. It will display an error message to correct you. Enter the name and click Create. Then wait a few moments and you will get your empty lakehouse.&lt;/p&gt;
&lt;p&gt;&lt;img alt="New Lakehouse dialog to enter in the name, with a Create button and then an arrow pointing to a screengrab of the Explorer pain showing LGB_Customers tree with a Tables and Files folder" class="gallery-image" data-flex-basis="816px" data-flex-grow="340" height="200" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-a-lakehouse/2023-10-23_21-10-33.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="what-is-created"&gt;What is created?
&lt;/h2&gt;&lt;p&gt;Every lakehouse created in Fabric also creates an SQL Endpoint and a Power BI Dataset. Even though we have not added data the containers are already there to handle the data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Lineage view of the three items. On the left is the Lakehouse with an arrow to the SQL Endpoint in the middle and the dataset on the right." class="gallery-image" data-flex-basis="1754px" data-flex-grow="731" height="93" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/fabric-create-a-lakehouse/2023-10-23_21-17-04.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;p&gt;Microsoft’s Lakehouse Overview – &lt;a class="link" href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-overview" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-overview&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Power Automate – Write Me a Flow</title><link>https://hatfullofdata.blog/power-automate-write-me-a-flow/</link><pubDate>Wed, 09 Aug 2023 16:44:09 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-write-me-a-flow/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-write-me-a-flow/cover.png" alt="Featured image of post Power Automate – Write Me a Flow" /&gt;&lt;p&gt;Power Automate create includes a feature called Describe it to design it which will write me a flow if I can describe it. In Aug 2023 its still in preview, and is not 100% and only copes with simple requests. It doesn’t require a co-pilot licence though!&lt;/p&gt;
&lt;p&gt;I started to explore this feature for a session for Scottish Summit 2023, trying to do 3 demos in a 25 minute session, I needed my first demo to be quick.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/VckJtQdbg6Q" target="_blank" rel="noopener"
 &gt;&lt;img alt="Thumbnail from the YouTube video Power Automate Write me a flow" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/Power-Automate-write-a-flow-for-me-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="getting-started"&gt;Getting Started
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Describe it to design it tile from Create page in Power Automate" class="gallery-image" data-flex-basis="259px" data-flex-grow="108" height="277" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/image-8.png" width="300"&gt;&lt;/p&gt;
&lt;p&gt;On Power Automate site click on Create and then click on the Describe it to design it tile. This starts a 3 step process. The first step is to describe the flow. My simple request was when I added a new file to a SharePoint library that the Power BI report that was based on that library got refreshed.&lt;/p&gt;
&lt;p&gt;Once Step 1 appears I enter in my request using a “When X then Y” pattern. It will show you a list of suggestions as you type. Click the arrow to submit the description. If it works you get a suggested flow and you can click Next to move onto Step 2&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="197px" data-flex-grow="82" height="826" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/image-10.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When it cannot translate your description into a flow, it shows a message of No flow suggestions. This feature is in preview currently so its not yet working 100%. There are links to provide feedback, they can’t fix what you don’t tell them.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="542px" data-flex-grow="225" height="301" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/image-11.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="step-2--connections"&gt;Step 2 – Connections
&lt;/h2&gt;&lt;p&gt;When you click next it takes you to step 2 of 3. Here you are asked to review the connections the flow will use.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="417px" data-flex-grow="173" height="333" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/image-12.png" width="579"&gt;&lt;/p&gt;
&lt;h2 id="step-3--settings"&gt;Step 3 – Settings
&lt;/h2&gt;&lt;p&gt;The final step is to add some settings to the flow steps. The drop downs are populated just like in the full flow editor. In some of my explorations it didn’t give me everything I needed but it works mostly. The you click Create flow.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="227px" data-flex-grow="94" height="716" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/image-13.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="power-automate-did-write-me-a-flow"&gt;Power Automate did write me a flow!
&lt;/h2&gt;&lt;p&gt;Very quickly you get presented with a flow. I recommend editing the name in the top left and of course pressing save in the top right. Then test your flow out.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="449px" data-flex-grow="187" height="363" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-write-me-a-flow/image-14.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;For getting started, asking Power Automate to write me a flow is great. For developing a long complex flow its not going to help much. It does allow you to explore some ideas and with the right description it will build longer flows.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate Button in a Power BI Report</title><link>https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/</link><pubDate>Mon, 07 Aug 2023 20:39:39 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/cover.png" alt="Featured image of post Power Automate Button in a Power BI Report" /&gt;&lt;p&gt;You can add an action to a Power BI report by adding a Power Automate button. The button will trigger a flow to run and perform actions. You add data to be used in the flow. In this post I will show to use a flow to add a row to a table that the report is connected to.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=B59qRKCzV4g" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/Power-Automate-button-in-a-Power-BI-report-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="problem-definition"&gt;Problem Definition
&lt;/h2&gt;&lt;p&gt;The report is connected to a table in a database that contains the start times of sections in a bike ride. The section times are used to for calculations and colouring charts. There are three measures that calculate the values to put in a new row of data. I want a Power Automate button to insert a row into my database table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab showing the table of data and the chart it highlights in different colours" class="gallery-image" data-flex-basis="318px" data-flex-grow="132" height="513" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-a-power-automate-button"&gt;Add a Power Automate Button
&lt;/h2&gt;&lt;p&gt;From the Insert ribbon tab in Power BI desktop, we select the Power Automate visual. It’s right down the bottom under Other. This will add you a visual that includes instructions. The first step is adding data to the visual that will get passed into the flow. I have added my three measures.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shots showing adding the Power Automate button to the report from the drop down on the Insert ribbon" class="gallery-image" data-flex-basis="445px" data-flex-grow="185" height="366" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-2.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="creating-the-flow"&gt;Creating the flow
&lt;/h2&gt;&lt;p&gt;After you add the data, the next step creates the flow. Click on the … link on the top of the visual and select Edit. This will open a window in Power BI desktop showing you templates and any existing flows that you have.&lt;/p&gt;
&lt;p&gt;In the top left, select New and select Instant cloud flow. Then the window moves to give you Power Automate flow editor inside Power BI desktop. Be aware it will be using the credentials you logged into Power BI with.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="359px" data-flex-grow="149" height="454" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-3.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then you can click New step and add your actions. In this example I am using SQL Server connection Action to insert a row to a table. I populate the Server name, Database name and Table name. Then the table fields appear. When I click in ActivityID, the first field the Dynamic content shows me the fields available including values I added to the Power Automate button.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="454px" data-flex-grow="189" height="359" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-4.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When I click on Power BI data Selected Activity ID, measure from my report, it populates the box and it also puts the action into a Apply to each. This is because the values are sent to the flow in a table. When writing the flow it knows its a table so assumes it could be multiple values so therefore adds the apply to each.&lt;/p&gt;
&lt;p&gt;There are multiple ways to handle this and convert that table into just three values, or we can accept we know the Apply to each only ever get a single row. Add a comment in your documentation to save future confusion.&lt;/p&gt;
&lt;h2 id="save-and-apply-the-flow"&gt;Save and Apply the Flow
&lt;/h2&gt;&lt;p&gt;When you have completed your flow. You need to add a name in the top left. Then click Save and then click Save and Apply. Yes you need to click both!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot showing the places to change the flow name, click Save and then click Save and " class="gallery-image" data-flex-basis="496px" data-flex-grow="206" height="329" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-5.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After you click Save and Apply you should get a success message in a green bar. Then you can click Back to Report in the top left.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="694px" data-flex-grow="289" height="235" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-6.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The visual in your report will now have changed to be a blue button. And you can test it out. In Power BI desktop you need to Ctrl + click, when you publish you can just click the button.&lt;/p&gt;
&lt;h2 id="formatting-the-button"&gt;Formatting the Button
&lt;/h2&gt;&lt;p&gt;Similar to other Power BI visuals formatting can be applied. The blue isn’t a theme colour so I recommend selecting a theme colour so it will change with themes. You also can tweak padding, shadows and the text to make it look part of the report. I could not find a way to change the arrow icon.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="1295px" data-flex-grow="539" height="126" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/image-7.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="flow-environments"&gt;Flow Environments
&lt;/h2&gt;&lt;p&gt;A Power Automate flow lives in an Environment and developers usually get to select which environment and get to put flows into solutions ready to go through a development life cycle. When writing that flow in Power BI desktop you do not get a choice on environment. It goes into Default environment and therefore cannot be put through any development lifecycle.&lt;/p&gt;
&lt;p&gt;One workaround / hack exists. Thank you to James Reeves who pointed it out in a &lt;a class="link" href="https://www.linkedin.com/posts/powerbi-limited_re-power-automate-environment-power-bi-activity-7093135914809311232-mQ_v/" target="_blank" rel="noopener"
 &gt;LinkedIn Post&lt;/a&gt;. It works currently but its a hack and should be treated as such.&lt;/p&gt;
&lt;h2 id="flow-permissions-and-licences"&gt;Flow Permissions and licences
&lt;/h2&gt;&lt;p&gt;When the flow runs it runs as the user who clicks the button. This means firstly the user must have access to the flow, so don’t forget to share it and if like in my example it uses premium connectors the user needs the right licences.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Adding a way to react to the data and do write is great and Power Automate does it pretty well. There are some missing features though, I’d like to select environment for the flow and be able to select a flow from the solution I’ve added the Power BI report to. And then include that in the solution lifecycle management.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate – Get data from a Power BI dataset</title><link>https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/</link><pubDate>Tue, 11 Jul 2023 16:05:12 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/cover.png" alt="Featured image of post Power Automate – Get data from a Power BI dataset" /&gt;&lt;p&gt;Power BI datasets contain a rich useful data resource that would be really useful in a Power Automate flow. In this post we will walk through how to get data from a Power BI dataset and then email that data. This is just one example of how you could use data fetched from a Power BI dataset behind a report.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/HMAMtYYcS7M" target="_blank" rel="noopener"
 &gt;&lt;img alt="Thumbnail from YouTube" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/Power-Automate-get-data-from-Power-BI-dataset-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="starting-the-flow"&gt;Starting the Flow
&lt;/h2&gt;&lt;p&gt;In this example we want to send a monthly quick summary. So I started by creating a scheduled email, repeated every month. After I enter the flow name and change the repeat to every month rather than the default every minute! Now I can press Create, which after a few moments creates a flow with the recurrence step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs showing the Scheduled cloud flow tile and then the first dialog to enter in the flow name and then select repeat monthly. Finally a screen grab of the flow with the recurrence trigger." class="gallery-image" data-flex-basis="410px" data-flex-grow="170" height="398" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-07_13-53-21.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="fetch-data-using-a-power-bi-step"&gt;Fetch Data using a Power BI step
&lt;/h2&gt;&lt;p&gt;Click on New step to start the process. In the search box type in Power BI and click on the Power BI tile when it appears. Now you can search the Power BI actions. In the search box enter in query and this will filter to 2 actions. The action we want is Run a query against a dataset.&lt;a class="link" href="#footnote_1_1771" &gt;1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs showing the search for Power BI and then searching for query in the Power BI actions." class="gallery-image" data-flex-basis="802px" data-flex-grow="334" height="203" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-10_11-14-26.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;When the step appears, I select the Workspace and Dataset I am interested in. The query text is expecting a DAX statement. Don’t worry you don’t have to write the DAX by hand, we can get Power BI desktop to do it for us.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grab of the Run a query step with the workspace and dataset populated, but the query text is blank." class="gallery-image" data-flex-basis="570px" data-flex-grow="237" height="264" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-10_11-57-28.png" width="628"&gt;&lt;/p&gt;
&lt;h2 id="writing-the-query-text"&gt;Writing the Query Text
&lt;/h2&gt;&lt;p&gt;Power BI desktop can write the query text for you. You need to open the Power BI report or a report connected to the dataset. On a blank page add a table visual. Populate the table with the data you want to use in Power Automate remember to apply the correct filters. I also recommend you remove totals unless you want the totals row in your data.&lt;/p&gt;
&lt;p&gt;In my example the table shows Total Sales and Sales Growth for products in the previous month, using Offset Month column from my calendar.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab showing the build a visual pane, filters on this visual and the Totals setting turned off to build the table, also shown" class="gallery-image" data-flex-basis="249px" data-flex-grow="103" height="655" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-10_13-33-14.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After creating the table, on the Optimize ribbon tab click on Performance analyzer&lt;a class="link" href="#footnote_2_1771" &gt;2&lt;/a&gt;. When the pane appears on the right hand side, click on Start Recording. Then you click on Refresh Visuals. This tool is usually used for analysing how long each visual takes to refresh and part of that is to provide the query being run.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Toolbar showing the Perfomance Analyser on the ribbon and then the pane that appears" class="gallery-image" data-flex-basis="220px" data-flex-grow="91" height="738" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-10_13-49-18.png" width="677"&gt;&lt;/p&gt;
&lt;p&gt;Expand the Table line by clicking on the +. Then click on Copy Query. Now you can return to the flow in Power Automate and paste the query into the query box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power Automate step with the query pasted to get data from a Power BI dataset" class="gallery-image" data-flex-basis="228px" data-flex-grow="95" height="715" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-10_14-07-28.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="sending-the-email"&gt;Sending the Email
&lt;/h2&gt;&lt;p&gt;The final part of this process is to create the email to send the details. The Power BI step returns an array of the rows of data. The Send an Email action would like this array converted into a html table. So we need 2 actions, create HTML table and Send an email. I am not going to make the table or email pretty. That is a separate post!&lt;/p&gt;
&lt;p&gt;&lt;img alt="2 steps in Power Automate to create html table and then send the email." class="gallery-image" data-flex-basis="276px" data-flex-grow="115" height="551" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-10_17-04-31.png" width="635"&gt;&lt;/p&gt;
&lt;h2 id="testing-the-flow"&gt;Testing the flow
&lt;/h2&gt;&lt;p&gt;I would test as I added each action to the flow, even on a short flow. Obviously once completed I’d test again.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab showing the 4 steps in the flow all with green ticks and the email as the final result." class="gallery-image" data-flex-basis="652px" data-flex-grow="272" height="250" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/2023-07-11_16-31-57.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;The report used for this example can be found on my &lt;a class="link" href="https://github.com/Laura-GB/DemoData#readme" target="_blank" rel="noopener"
 &gt;GitHub&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Power BI Report – &lt;a class="link" href="https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.pbix" target="_blank" rel="noopener"
 &gt;https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.pbix&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Excel file &lt;a class="link" href="https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.xlsx" target="_blank" rel="noopener"
 &gt;https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Remember its Power Automate not Power Integrate. So yes you can load a long list into Power Automate but this is not a good tool to load large quantities of data into a new system. This is a brilliant feature though that unlocks data in a dataset for an automation process.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The other action I have no idea how it works and have yet to find any documentation [&lt;a class="link" href="#identifier_1_1771" &gt;↩&lt;/a&gt;]&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In earlier versions of Power BI it was on the view ribbon [&lt;a class="link" href="#identifier_2_1771" &gt;↩&lt;/a&gt;]&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Creating a Custom Smart Narrative</title><link>https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/</link><pubDate>Fri, 07 Jul 2023 12:15:53 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/</guid><description>&lt;p&gt;Power BI desktop includes the Smart Narrative visual. This will summarise a page or visual in your report for you. Often though the summary it produces is not the summary you would have written. This post will show you how to write your own custom smart narrative that updates and filters exactly the same as the standard smart narrative.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=5gl4t3a6GN4" target="_blank" rel="noopener"
 &gt;&lt;img alt="thumbnail from YouTube" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/Power-BI-Custom-Smart-Narrative-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="what-is-the-smart-narrative"&gt;What is the Smart Narrative?
&lt;/h2&gt;&lt;p&gt;With a report open in Power BI desktop, you can add a standard Smart narrative by selecting Smart Narrative from the Insert ribbon. It will create text based on the visuals on that page. It doesn’t support all visuals and although can be very good it is very generic.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen shot of the insert ribbon highighting the smart narrative button and a screen shot of an example standard smart narrative" class="gallery-image" data-flex-basis="398px" data-flex-grow="165" height="410" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/2023-07-07_10-57-12.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;More instructions and information can be found at &lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-smart-narrative" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-smart-narrative&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="create-your-own-custom-smart-narrative"&gt;Create your own custom smart narrative
&lt;/h2&gt;&lt;p&gt;The smart narrative is a text box with some generated text added. The clever part is adding values to that text box.&lt;/p&gt;
&lt;p&gt;Start by adding a text box to your report. Position it and start to add some text.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="927px" data-flex-grow="386" height="176" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/2023-07-07_11-14-21.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you want to add a dynamic result to the text click on the Value button on the Text box ribbon. Describe what you would like to calculate. If the dialog offers suggestions as to what you mean click on the correct one. When you click Save, the value will be entered into the text box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grans showing the stages of adding a value to the custom smart narrative" class="gallery-image" data-flex-basis="359px" data-flex-grow="149" height="454" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/2023-07-07_11-20-29.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Formatting to numbers could be applied when creating a text box value. Weirdly you cannot use the same name for values in different text boxes unless you copy and paste the text box then its fine. The values cannot transfer into any other visual either, use measures for that.&lt;/p&gt;
&lt;h2 id="reviewing-the-values"&gt;Reviewing the Values
&lt;/h2&gt;&lt;p&gt;When you added values to your custom smart narrative you hopefully remembered to name them. This helps when you go to review the values. Click on Review to list the values. You can click on edit on any value to confirm what question you asked, rename or apply extra formatting&lt;/p&gt;
&lt;p&gt;&lt;img alt="reviewing values used in your text box" class="gallery-image" data-flex-basis="582px" data-flex-grow="242" height="280" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/2023-07-07_11-35-10.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;The report and the data source used in this blog post can be found on my &lt;a class="link" href="https://github.com/Laura-GB/DemoData#readme" target="_blank" rel="noopener"
 &gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Power BI Report – &lt;a class="link" href="https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.pbix" target="_blank" rel="noopener"
 &gt;https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.pbix&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Excel file &lt;a class="link" href="https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.xlsx" target="_blank" rel="noopener"
 &gt;https://github.com/Laura-GB/DemoData/raw/main/Sales%20Data.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Know your audience, does a summary paragraph work for them? If it doesn’t then stick to visuals that work for them. Some clients love a description others just prefer a batch of cards showing the same values.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Platform Solution and Power BI – Part 3</title><link>https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/</link><pubDate>Mon, 22 May 2023 22:17:42 +0000</pubDate><guid>https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/</guid><description>&lt;img src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/cover.png" alt="Featured image of post Power Platform Solution and Power BI – Part 3" /&gt;&lt;p&gt;In Part 1 we added Power BI to the Power Platform solution and then in Part 2 we added a dashboard. This is post we will embed the report into a form and filter the report to match the context of the form. For this we will use the Accounts form and filter the expenses report to only show the expenses related to one account.&lt;/p&gt;
&lt;h2 id="series"&gt;Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Part 1 – Add Power BI dataset and report to solution&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/" target="_blank" rel="noopener"
 &gt;Part 2 – Show report in a dashboard&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/" target="_blank" rel="noopener"
 &gt;Part 3 – Embed report in a form and add context filtering&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/JoaBoL2ljcM" target="_blank" rel="noopener"
 &gt;&lt;img alt="thumbnail from YouTube" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/Power-Platform-Solutions-and-Power-BI-Part-3-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="embed-the-report-into-a-form"&gt;Embed the report into a form.
&lt;/h2&gt;&lt;p&gt;In my Power Platform solution, the Accounts table has one form included. When I edit the form I can see that I previously added a tab for expenses. On that tab there is an empty section, ready to insert the report.&lt;/p&gt;
&lt;p&gt;In the left hand side menu, select components and expand Power BI. Drag and drop Power BI report into the blank section. An pane appears asking lots of questions regarding showing various parts. For now leave all of them as default and click Done. The unfiltered report should appear.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="454px" data-flex-grow="189" height="359" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/2023-05-15_20-29-25.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="filtering-the-embedded-report"&gt;Filtering the embedded report.
&lt;/h2&gt;&lt;p&gt;The report needs to be filtered to only show the expenses of the selected account. With the report selected you will get the properties pane showing on the right hand side. Expand Components and click on Power BI Report. In the pane that appears, same as before find JSON filter string. You need a JSON string to put in the Static value.&lt;/p&gt;
&lt;p&gt;The filter we are going to apply is straight forward match the account id on the form with the account id in the report. We need 3 bits of information&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Power BI Report table name – Account&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Power BI Report column name for the account id – AccountID&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dataverse logical column name for account id – accountid&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You must get the case and of course the spelling right. We then insert these into a json string. The whole string must be on one line, no returns and tabs to make it pretty. Below is an image to explain the parts and below that is the code I used.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image showing Account and AccountID comes from Power BI and accountid comes from Dataverse" class="gallery-image" data-flex-basis="491px" data-flex-grow="204" height="332" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/2023-05-16_08-44-27.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{&amp;#34;Filter&amp;#34;: &amp;#34;[{\&amp;#34;$schema\&amp;#34;:\&amp;#34;basic\&amp;#34;,\&amp;#34;target\&amp;#34;: {\&amp;#34;table\&amp;#34;:\&amp;#34;Account\&amp;#34;,\&amp;#34;column\&amp;#34;:\&amp;#34;AccountID\&amp;#34;}, \&amp;#34;operator\&amp;#34;:\&amp;#34;In\&amp;#34;,\&amp;#34;values\&amp;#34;:[$a],\&amp;#34;filterType\&amp;#34;:1}]&amp;#34;, &amp;#34;Alias&amp;#34;: {&amp;#34;$a&amp;#34;: &amp;#34;accountid&amp;#34;}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;When editing a form in Dataverse, the form is in new record mode so if you have the filter right the report should filter to nothing. When it is working click Done and Save and Publish your form.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab showing the Edit Power BI report pane and the report filtered to no records showing Blank a few times." class="gallery-image" data-flex-basis="410px" data-flex-grow="170" height="398" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/2023-05-16_08-56-15.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="testing-the-form"&gt;Testing the form
&lt;/h2&gt;&lt;p&gt;Make sure you test your form. Open your app, open an account and look at the expenses and the report. If your report is a direct query report you should be able to add a new record and the report update.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grab of the model driven app in the Power Platform solution showing the expenses tab and the embedded report." class="gallery-image" data-flex-basis="488px" data-flex-grow="203" height="334" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/2023-05-16_09-30-02.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The three posts combined gives us the building blocks to include Power BI in our Power Platform Solutions. I’m hoping more Power BI artefacts such as dataflows also get included in time. There will be future posts, let me know what you want me to do.&lt;/p&gt;
&lt;p&gt;Here are the resources I used&lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-power-bi-powerapps-integration-about" target="_blank" rel="noopener"
 &gt;About Power BI in Power Apps Solutions – Power BI | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Platform Solution and Power BI – Part 2</title><link>https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/</link><pubDate>Sat, 20 May 2023 19:08:20 +0000</pubDate><guid>https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/</guid><description>&lt;img src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/cover.png" alt="Featured image of post Power Platform Solution and Power BI – Part 2" /&gt;&lt;h2 id="intro--add-a-dashboard"&gt;Intro – Add a Dashboard
&lt;/h2&gt;&lt;p&gt;In Part 1 we added a Power BI dataset and report to a Power Platform Solution. In Part 2 we will create a dashboard and add it to the model driven app.&lt;/p&gt;
&lt;h2 id="series"&gt;Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Part 1 – Add Power BI dataset and report to solution&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/" target="_blank" rel="noopener"
 &gt;Part 2 – Show report in a dashboard&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/" target="_blank" rel="noopener"
 &gt;Part 3 – Embed report in a form and add context filtering&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;h2 id="create-the-dashboard"&gt;Create the Dashboard
&lt;/h2&gt;&lt;p&gt;In the solution click on +New and select Dashboard and then Power BI embedded. When the pane on the right hand side loads, enter in a name for your dashboard. Then make sure Power BI report is selected and select your report from the drop down.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grabs showing the New drop down and the pane that appears when you select Power BI embedded to add a dashboard to the Power Platform Solution" class="gallery-image" data-flex-basis="354px" data-flex-grow="147" height="461" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/2023-05-15_18-53-19.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-the-dashboard-to-the-app-in-the-power-platform-solution"&gt;Add the Dashboard to the App in the Power Platform Solution
&lt;/h2&gt;&lt;p&gt;After the dashboard has been added, you can add the dashboard to a model driven app. Edit the app by clicking on the name of it in the Power Platform Solution. Then click on Add Page and the New page dialog appears. On the first page select Dashboard and then click Next. Then on the next page, select your report, probably at the bottom of the list. Finally click Add to add the dashboard to your app.&lt;/p&gt;
&lt;p&gt;&lt;img alt="New page dialog box showing the options as described in the previous paragraph." class="gallery-image" data-flex-basis="762px" data-flex-grow="317" height="214" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/2023-05-15_19-04-29.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="note"&gt;Note
&lt;/h3&gt;&lt;p&gt;At the time of publishing there is a small bug that the report doesn’t show correctly in edit mode but if you publish all customisations it fixes it in play mode. Remember this feature&lt;/p&gt;
&lt;h2 id="testing-the-report"&gt;Testing the Report
&lt;/h2&gt;&lt;p&gt;As with any addition to a development you should test the report works. In my example the report is a direct query. So my test is check the dashboard, then add a new expense record and then return to the dashboard to check the new record is showing.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;For some projects this is enough, an embedded dashboard in the model driven app. The next post will be to add an embedded report into a form.&lt;/p&gt;
&lt;p&gt;As in Part 1 here are the resources I’ve used&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-power-bi-powerapps-integration-about" target="_blank" rel="noopener"
 &gt;About Power BI in Power Apps Solutions – Power BI | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Platform Solution and Power BI – Part 1</title><link>https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/</link><pubDate>Fri, 19 May 2023 08:26:43 +0000</pubDate><guid>https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/</guid><description>&lt;img src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/cover.png" alt="Featured image of post Power Platform Solution and Power BI – Part 1" /&gt;&lt;p&gt;Power BI reports can be an important part of a Power Platform solution. Microsoft has added a new feature to Power Platform Solutions to add a Power BI dataset and report. Then you can add the Power BI report in as a dashboard or as an embedded report in a form and add context filtering. Part 1 will cover adding the Power BI dataset and report to the solution.&lt;/p&gt;
&lt;h2 id="series"&gt;Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Part 1 – Add Power BI dataset and report to solution&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-2/" target="_blank" rel="noopener"
 &gt;Part 2 – Show report in a dashboard&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-3/" target="_blank" rel="noopener"
 &gt;Part 3 – Embed report in a form and add context filtering&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/c1NtBbiS8Gk" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube Thumbnail of video" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/Power-Platform-Solutions-and-Power-BI-Part-1-Time-0_00_00001.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="preparation"&gt;Preparation
&lt;/h2&gt;&lt;p&gt;For this post I have a Power Platform solution already. I have a Power BI report connected to the environment and published to a workspace.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screengrab of a Power platform solution and a workspace" class="gallery-image" data-flex-basis="709px" data-flex-grow="295" height="230" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/2023-05-15_14-22-43.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="add-power-bi-to-power-platform-solution"&gt;Add Power BI to Power Platform Solution
&lt;/h2&gt;&lt;p&gt;First task is to add the Power BI report to the solution. Start by clicking on Add Existing and from Analytics selecting Power BI report. This will bring the underlying dataset in as well. Then click on From Power BI which will show you a workspace drop down*.&lt;/p&gt;
&lt;p&gt;From the drop down, we select the right workspace and then the right report. Then we click on Add.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grabs showing the add existing drop down and the form that shows when you click Power BI" class="gallery-image" data-flex-basis="358px" data-flex-grow="149" height="455" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/2023-05-15_14-26-23.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;It takes a while for the dataset and report to be added. Behind the scenes a new workspace is created and the report is copied to there. If you don’t have permission to create a workspace you will get errors.&lt;/p&gt;
&lt;h2 id="checking-the-new-workspace"&gt;Checking the New Workspace
&lt;/h2&gt;&lt;p&gt;I recommend that you check the workspace. Check the credentials in the dataset and refresh the dataset and finally make sure the report opens and shows data. Remember to setup a refresh schedule if your report needs it.&lt;/p&gt;
&lt;p&gt;Note the message across the top telling you that this is a workspace connected to a solution and the workspace icon is the Power Apps icon.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the new workspace that has a PowerApps icon as its icon." class="gallery-image" data-flex-basis="545px" data-flex-grow="227" height="299" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/2023-05-15_16-37-50.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="finishing-the-connection-part"&gt;Finishing the connection part
&lt;/h2&gt;&lt;p&gt;The report is connected to this environment’s Dataverse. When the solution is exported and imported the report needs to be connected to the new environment’s Dataverse.&lt;/p&gt;
&lt;p&gt;In the solution, I clicked on the three dots and selected Edit. Then a pane will appear on the right. Then select Yes from for the existing connection question and click Save.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grans showing the drop down on the" class="gallery-image" data-flex-basis="473px" data-flex-grow="197" height="345" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/2023-05-15_17-02-35.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion-and-resources"&gt;Conclusion and Resources
&lt;/h2&gt;&lt;p&gt;Congratulations, you now have a solution that includes a Power BI report.&lt;/p&gt;
&lt;p&gt;This is just Part 1. The future parts will cover adding a dashboard and an embedded report. Here are the resources I have used.&lt;a class="link" href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-power-bi-powerapps-integration-about" target="_blank" rel="noopener"
 &gt;About Power BI in Power Apps Solutions – Power BI | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Using SQL on Dataverse for Power BI</title><link>https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/</link><pubDate>Wed, 26 Apr 2023 16:55:19 +0000</pubDate><guid>https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/</guid><description>&lt;img src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/cover.png" alt="Featured image of post Using SQL on Dataverse for Power BI" /&gt;&lt;p&gt;SQL (Structured Query Language) has been used to get data in and out of databases for decades. Dataverse is a database. So lets use SQL on Dataverse to fetch data into a report. This can simplify our queries and make a direct query report easier to write.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/SbWxzBlwN0k" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/SQL-on-Dataverse-in-Power-BI107d4459.autosave-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="microsoft-sql-server-management-studio"&gt;Microsoft SQL Server Management Studio
&lt;/h2&gt;&lt;p&gt;There are multiple tools available to write and test your SQL, for this post I am using SQL Server Management Studio (SSMS), which is a free tool from Microsoft. You can download SSMS from&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener"
 &gt;https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After you have downloaded SSMS, you can start it. Then you need to login to the specific environment. A dialog should pop up to fill in or you can click Connect. The Server type is Database Engine. The server name is in the url path from running a model driven app.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Model driven app with url highlighted" class="gallery-image" data-flex-basis="461px" data-flex-grow="192" height="316" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/2023-04-24_12-42-41.png" width="607"&gt;&lt;/p&gt;
&lt;p&gt;For this post the authentication I am using is Azure Active Directory – Password. So I also supply a User Name and Password. Then you can click Connect.&lt;/p&gt;
&lt;p&gt;&lt;img alt="connection dialog" class="gallery-image" data-flex-basis="360px" data-flex-grow="150" height="453" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/2023-04-24_12-41-18.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When connection has completed, the Object Explorer pane will show the hierarchy of items. Expand Databases to find your environment database and then expand that database and Tables to see the complete list of tables. Expand the table to see the list of columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Object explorer pane with account table expanded" class="gallery-image" data-flex-basis="347px" data-flex-grow="144" height="469" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/2023-04-24_12-54-02.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="write-your-first-query"&gt;Write your first query
&lt;/h2&gt;&lt;p&gt;This post is not to teach you SQL. There are plenty of sites to do that. Here are some very simple queries to get you started. For our first query, we will write a query to fetch a list of accounts. Click on New Query and a blank page appears. In here we can type a simple query to list all accounts. Click Execute to run the query and see the results.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="378px" data-flex-grow="157" height="431" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/2023-04-24_13-13-25-2.png" width="680"&gt;&lt;/p&gt;
&lt;h4 id="sql-code"&gt;SQL Code
&lt;/h4&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Select
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	accountid as AccountID,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	name as &amp;#34;Account Name&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	industrycodename as Industry,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	statecode,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	statecodename
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;from
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	dbo.account
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="filtering-the-data"&gt;Filtering the data
&lt;/h2&gt;&lt;p&gt;The previous example includes an account that is not active. Contoso Pharmaceuticals has a statecode of 1 and statecodename of Inactive. For this example we are going to filter to only show the active records. The active records have 0 in the statecode column. The WHERE clause applies the filter. The statecode and statecodename columns can be removed.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Select
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	accountid as AccountID,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	name as &amp;#34;Account Name&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	industrycodename as Industry
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;from
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	dbo.account
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;where
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	statecode = 0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="using-sql-on-dataverse-in-power-bi"&gt;Using SQL on Dataverse in Power BI
&lt;/h2&gt;&lt;p&gt;Now we have an SQL statement we can use it in Power BI. Start POwer BI and then click Transform data to open Power Query. Then we create a parameter by clicking Manage Parameters and then click New and fillin in the details. The current value should be the environment path you used earlier.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="221px" data-flex-grow="92" height="736" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/2023-04-24_14-37-37.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Now you have the parameter we can create the query. Start by creating a blank query by clicking New Source and then Blank Query. Then on the Home ribbon click Advanced Editor and paste in this code. I have adapted a pattern created by Scott Sewell.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Dataverse = CommonDataService.Database(Environment, 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; [CreateNavigationProperties=false]),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SQL = &amp;#34;Select
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 accountid as AccountID,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 name as &amp;#34;&amp;#34;Account Name&amp;#34;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 industrycodename as Industry
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; from
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 dbo.account
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; where
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 statecode = 0&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = Value.NativeQuery(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Dataverse,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SQL,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; null,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; [EnableFolding=true]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Note 1 – the CreateNavigationProperties and EnableFolding are important flags to help with performance. Scott Sewell explains both topics in these posts.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.linkedin.com/pulse/speedtip-enablefolding-option-dataverse-native-sql-power-sewell/" target="_blank" rel="noopener"
 &gt;https://www.linkedin.com/pulse/speedtip-enablefolding-option-dataverse-native-sql-power-sewell/&lt;/a&gt;&lt;a class="link" href="https://www.linkedin.com/pulse/stuck-evaluating-dataverse-source-power-bi-try-speedtip-sewell/" target="_blank" rel="noopener"
 &gt;https://www.linkedin.com/pulse/stuck-evaluating-dataverse-source-power-bi-try-speedtip-sewell/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note 2 – If your SQL includes any ” you will need to double them up inside the string. In this example the ” is needed as the column Account Name has a space in it’s name.&lt;/p&gt;
&lt;p&gt;For other queries you just replace the SQL = step with a different SQL statement. You can add further transformations if you need them into Power Query. Remember to rename your query to a clear name.&lt;/p&gt;
&lt;h2 id="permission-to-run-a-native-database-query"&gt;Permission to Run a Native Database Query
&lt;/h2&gt;&lt;p&gt;SQL is a powerful language. On some databases, not Dataverse, it can edit or delete the data. So Power Query will check the first time it runs any query. A message in a yellow bar appears stating Permission is required. When you click Edit Permission, a dialog appears showing you the query and you can click the Run button. Then the data will appear.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The warning message regarding permission being required and the dialog box that lets you click Run to say yes to running the query" class="gallery-image" data-flex-basis="249px" data-flex-grow="104" height="653" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/2023-04-24_16-40-29.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="loading-into-power-bi-desktop"&gt;Loading into Power BI Desktop
&lt;/h2&gt;&lt;p&gt;Now you have a query that loads data you can load it into Power BI desktop by clicking Close &amp;amp; Apply on the home ribbon. Before it will load the data it will ask you to set the storage mode. For this post I am selecting DirectQuery. This means the data is live and data security is applied using the report viewer’s security. (See publishing to get this 100% right)&lt;/p&gt;
&lt;p&gt;&lt;img alt="setting storage mode to either Import of Direct Query" class="gallery-image" data-flex-basis="430px" data-flex-grow="179" height="379" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/Screenshot-2023-04-26-093929.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;It will ask you confirm running the query again, just click Run. Once the data has loaded we add relationships if required, measures and visuals into the report. Be aware direct query will need to refresh and so will be slightly slower.&lt;/p&gt;
&lt;p&gt;&lt;img alt="table visual in Power BI desktop" class="gallery-image" data-flex-basis="480px" data-flex-grow="200" height="340" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/Screenshot-2023-04-26-094044.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="publishing"&gt;Publishing
&lt;/h2&gt;&lt;p&gt;Once you have completed the modelling and visuals, you can publish the report. You need to check the credentials of the report. Even if credentials look okay, confirm the viewers credentials are used. In the workspace, open up settings of the dataset. Under Data source credentials click on Edit credentials. Authentication method should be OAuth2 and select the appropiate security level.&lt;/p&gt;
&lt;p&gt;If you are using direct query then tick the bottom option so that report viewers credentials get used to fetch the data. Security within Dataverse is now applied to your report.&lt;/p&gt;
&lt;p&gt;Click Sign in and complete the sign in to now make your report ready for the report consumers.&lt;/p&gt;
&lt;p&gt;&lt;img alt="updating report credentials." class="gallery-image" data-flex-basis="233px" data-flex-grow="97" height="698" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/Screenshot-2023-04-26-095845.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Dataverse is a great data source for business apps and being able to report on the data in there is important. Building a simple efficient pattern to do this is important. Hopefully this post helps get you there.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Embed a Paginated Report</title><link>https://hatfullofdata.blog/power-bi-embed-a-paginated-report/</link><pubDate>Thu, 30 Mar 2023 19:24:23 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-embed-a-paginated-report/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/cover.jpg" alt="Featured image of post Power BI – Embed a Paginated Report" /&gt;&lt;p&gt;Within a Power BI report you can embed a paginated report. Values can be passed to the paginated report to populate parameters. The paginated report can be exported by a report consumer.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/aIDLAloE_oc" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/Embed-Paginated-inside-a-Power-BI-Report-Time-0_00_0000-1.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="paginated-report"&gt;Paginated Report
&lt;/h2&gt;&lt;p&gt;For this post we are going to use a paginated report connected to restaurant sales data. The report shows daily total dishes sold and takings. It uses 2 parameters, StartDate and EndDate to filter the report.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="516px" data-flex-grow="215" height="316" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_18-05-11.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="prepare-measures-for-parameter-values"&gt;Prepare Measures for Parameter Values
&lt;/h2&gt;&lt;p&gt;The Power BI report in this example uses the same data source of restaurant data. It doesn’t have to. The report requires 2 parameters. The easiest way to fill these vales would be to create measures. We create 2 measures to define the date range.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;StartDate = MIN(&amp;#39;Date&amp;#39;[Date])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;EndDate = MAX(&amp;#39;Date&amp;#39;[Date])
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="embed-a-paginated-report"&gt;Embed a Paginated Report
&lt;/h2&gt;&lt;p&gt;In a report in Power BI desktop drop down the visual selection from the Home or Insert ribbon. Then select the Paginated Report visual from the Other group.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Visual selection drop down" class="gallery-image" data-flex-basis="183px" data-flex-grow="76" height="448" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_18-35-58.jpg" width="343"&gt;&lt;/p&gt;
&lt;p&gt;When the visual appears, click on the Build Visual button to display the data options. Add the measures to the visual. Then click Connect to report button to select the report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding measures to the visual" class="gallery-image" data-flex-basis="384px" data-flex-grow="160" height="424" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_19-02-07.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next dialog shows all the paginated reports you have access to and includes a search box. Select the correct report and then click Set Parameters. Add the relevant measures from the dropdown. The current values of the measures will appear next to each measure.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Assigning measures to Parameters" class="gallery-image" data-flex-basis="570px" data-flex-grow="237" height="286" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_19-23-16.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click See report to see the report. In this report there is also a chart showing sales per week.&lt;/p&gt;
&lt;p&gt;&lt;img alt="result of embed a paginated report " class="gallery-image" data-flex-basis="425px" data-flex-grow="177" height="384" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_20-07-07.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="filtering-the-paginated-report"&gt;Filtering the Paginated Report
&lt;/h2&gt;&lt;p&gt;When a filter is applied that changes the measures used as parameters, a Apply changes button appears. Clicking this will filter the report.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="441px" data-flex-grow="184" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_20-19-54.jpg" width="552"&gt;&lt;/p&gt;
&lt;p&gt;We can remove Click on the report and click the format button. Then tick the Auto-apply. Now when the measures change the report will refresh immedeatly.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Turning on the Auto-apply filters." class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="359" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_20-41-38.jpg" width="449"&gt;&lt;/p&gt;
&lt;h2 id="exporting-the-report"&gt;Exporting the Report
&lt;/h2&gt;&lt;p&gt;After the Power BI report is published, consumers can view it from the workspace or workspace app. When viewing the report the viewer can click on Export and select a format. Then all pages will download as a single file.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the Export button options." class="gallery-image" data-flex-basis="349px" data-flex-grow="145" height="458" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_21-00-24.jpg" width="667"&gt;&lt;/p&gt;
&lt;p&gt;The toolbar at the top of the report allows the viewer to navigate the pages. We can open the report with the current filters applied by clicking Open Report.&lt;/p&gt;
&lt;h2 id="restricting-viewer-options"&gt;Restricting Viewer Options
&lt;/h2&gt;&lt;p&gt;When designing the report you can add restrictions to the embedded Paginated report from the format pane. We can hide the complete toolbar, or remove access to export, navigate pages and viewing the report alone. We can restrict exporting or the different export formats.&lt;/p&gt;
&lt;p&gt;&lt;img alt="restrict options for the embedded paginated report" class="gallery-image" data-flex-basis="329px" data-flex-grow="137" height="407" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/2023-03-26_21-26-53.jpg" width="559"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This was a very simple example with 2 simple parameters. The paginated report could have optional parameters with default values and could accept multiple values. The tricky part there is setting up the paginated report rather than embedding it.&lt;/p&gt;
&lt;p&gt;One great option would be to use bookmarks to save the common parameters.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Clear all Slicers Button</title><link>https://hatfullofdata.blog/power-bi-clear-all-slicers-button/</link><pubDate>Sat, 25 Mar 2023 16:34:22 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-clear-all-slicers-button/</guid><description>&lt;p&gt;The March 2023 Power BI update included a new button, Clear All Slicers. This allows you very quickly add a reset on a report for the slicers. It partly replaces the previous method explained in &lt;a class="link" href="https://hatfullofdata.blog/power-bi-resetting-slicers-with-a-bookmark-button/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/power-bi-resetting-slicers-with-a-bookmark-button/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=Y4BwaOclwc0" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/POwer-BI-Clear-All-Slicers-Button-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="adding-the-button"&gt;Adding the Button
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Insert button menu" class="gallery-image" data-flex-basis="128px" data-flex-grow="53" height="729" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/Screenshot-2023-03-25-154345.png" width="389"&gt;&lt;/p&gt;
&lt;p&gt;Head to the Insert ribbon and under Buttons select “Clear all slicers”. Nothing else needs to be done, although I would recommend formatting the button. The button will reset slicers to have no filters applied.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Clear all slicers button" class="gallery-image" data-flex-basis="627px" data-flex-grow="261" height="164" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/Screenshot-2023-03-25-154420.png" width="429"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="showing the effect of clicking the button to clear filters" class="gallery-image" data-flex-basis="1236px" data-flex-grow="515" height="132" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/Picture3.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="formatting"&gt;Formatting
&lt;/h2&gt;&lt;p&gt;The default styling for this button does not include a border. My opinion, which is potentially wrong, is there should be a border of some sort.&lt;/p&gt;
&lt;p&gt;The March 2023 update also included formatting updates. So to access the formatting pane of the button you might need to click the ellipses (…) on the button and select Format.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing the menu on the ellipses" class="gallery-image" data-flex-basis="743px" data-flex-grow="309" height="214" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/Screenshot-2023-03-25-154646.png" width="663"&gt;&lt;/p&gt;
&lt;p&gt;In the format pane on the right of the screen look for Button Style. In that section you will find Text and Border. You can change and format both the display text and the border details.&lt;/p&gt;
&lt;h2 id="word-of-caution"&gt;Word of Caution
&lt;/h2&gt;&lt;p&gt;The button to reset slicers back to no filter. You need to be clear what that excludes. It will not remove filters applied by clicking on a visual and will not change a slicer that has a single select. You will need to use the previous method linked above to achieve that.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="447px" data-flex-grow="186" height="365" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/Picture1.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;For most reports this is a great addition. Too many reports with lots of slicers do not include a quick obvious way to reset the report filters. Combined with an apply all filters button this will greatly assist on filtering and unfiltering a direct query report.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Adoption in Your Business</title><link>https://hatfullofdata.blog/power-bi-adoption-in-your-business/</link><pubDate>Sat, 18 Mar 2023 18:07:15 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-adoption-in-your-business/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/cover.png" alt="Featured image of post Power BI Adoption in Your Business" /&gt;&lt;p&gt;So you’ve found Power BI, you’ve created amazing reports that answer every question your business has. Yet when you look at the stats your reports are not being looked at. People are still returning to the old spreadsheets and creating their own pie charts. What has gone wrong with your Power BI adoption?&lt;/p&gt;
&lt;p&gt;You might have adopted Power BI but your business hasn’t. You need to take your business on the Power BI adoption journey. No they don’t need to learn M and DAX, but they do need to understand how they can view reports and how to use them. This post is to go along with a set of videos looking at ways to deliver the reports to your business report consumers. Click on the pictures to view the videos.&lt;/p&gt;
&lt;h2 id="report-delivery"&gt;Report Delivery
&lt;/h2&gt;&lt;p&gt;Workspaces are not user friendly, you need to find the workspace and then the report etc. So what options are there for delivering the report to where the viewer already is. Here are four videos to get you started&lt;/p&gt;
&lt;p&gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="172" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/PowerPoint.png" width="300"&gt;
My favourite update for 2022 was being able to embed a Power BI report into PowerPoint with full functionality. This bring Power BI into the meeting without any fuss, window switching. Embedding is fast and simple assuming everyone has licenses and access.&lt;/p&gt;
&lt;p&gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="421px" data-flex-grow="175" height="171" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/SharePoint.png" width="300"&gt;
For outside the meeting but still in the areas your users work embedding in a SharePoint page could be the answer. If your users are working every day in SharePoint then this is the obvious place to embed your report.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://youtu.be/_1W0PJngHIg" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="172" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/teams.png" width="300"&gt;&lt;/a&gt;
Most Office workers use MS Teams for almost everything. So its obvious to pin that Power BI report into the relevant Teams channel for everyone to be able to quickly find it when they are working in that channel.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://youtu.be/2UqfsHlB3QM" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="390" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/apps.png" width="680"&gt;&lt;/a&gt;
When you have a complete report suite that should be delivered together then a Power BI App is your best option. Using Audiences you can tailor the experience based on the viewer. This is my second favourite update from 2022.&lt;/p&gt;
&lt;h2 id="report-experience"&gt;Report Experience
&lt;/h2&gt;&lt;p&gt;The average manager does not believe they have time to learn the complexities of how a new report works. So you need to make the transition easy. Give the 5 minute tour, listen to feedback and show them how to make it work for them.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://youtu.be/pHp4L2H7CGg" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="419px" data-flex-grow="174" height="389" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/bookmarks.png" width="680"&gt;&lt;/a&gt;
When a report covers multiple teams and slicers give users the specific results they need, show them how to use Personal Bookmarks. Now the report view is under their control and its quick and easy.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://youtu.be/LuAdbg1epP8" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="390" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/RLS.png" width="680"&gt;&lt;/a&gt;
When that multi-team report is exposing data too widely then Row Level Security should be considered. This is the simplest version. Another post will take this further.&lt;/p&gt;
&lt;h2 id="old-habits-die-hard"&gt;Old habits die hard
&lt;/h2&gt;&lt;p&gt;Excel is here to stay, do not make your Power BI adoption project a battle you cannot win. As much as Power BI can do much of the reporting that Excel does there are times when exploring the data in Excel is the best option. Showing your users how to connect Excel to a Power BI dataset will at least make sure the data they have in Excel should be the same as the data in Power BI.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://youtu.be/ELPODdLH1Rc" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-adoption-in-your-business/Export-data-from-Power-BI-Visual-Time-0_00_0000-1.png" width="680"&gt;&lt;/a&gt;
With the proper controls users can pull data from a Power BI dataset into a Pivot Table or into a table. However much you’d prefer they didn’t, they will want the data in Excel. So let them do it, with it controlled by you.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;In order for your reports to be used, trusted and promoted across the business you need to deliver them. Hopefully you have a few more ideas now on how you could do that. Please let me know if you have any other ideas to add to the list.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Export Data from Power BI Visuals</title><link>https://hatfullofdata.blog/export-data-from-power-bi-visuals/</link><pubDate>Sun, 05 Mar 2023 22:52:49 +0000</pubDate><guid>https://hatfullofdata.blog/export-data-from-power-bi-visuals/</guid><description>&lt;img src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/cover.jpg" alt="Featured image of post Export Data from Power BI Visuals" /&gt;&lt;p&gt;Excel has been the backbone of finance departments for decades. Almost every company has multiple spreadsheets that are business critical. Many Power BI adoption programmes have aimed to reduce the reliance on such spreadsheets. But we may still need to export data from Power BI into an Excel spreadsheet as old habits die hard and Excel is an amazing tool and Power BI will never replace it completely. This is one possible option and I will cover creating pivot tables from a dataset in another post.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=ELPODdLH1Rc" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export-data-from-Power-BI-Visual-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="export-data-from-a-visual"&gt;Export data from a visual
&lt;/h2&gt;&lt;p&gt;&lt;img alt="On a visual selecting Export data" class="gallery-image" data-flex-basis="896px" data-flex-grow="373" height="182" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_000.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When viewing a report in the Power BI Service, the viewer can click on the three dots usually in the top right of the visual. When the menu that appears, they can click Export data. (See &lt;a class="link" href="#Admin" &gt;Admin&lt;/a&gt; and &lt;a class="link" href="#ReportSetting" &gt;Report Settings&lt;/a&gt; sections if its not there) Then it will display a dialog giving potentially multiple ways to export data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Export data dialog showing 3 options, data with current layout, summarize data and underlying data. With Export and Cancel buttons in the bottom right corner." class="gallery-image" data-flex-basis="283px" data-flex-grow="118" height="576" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_001.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Different options will be available based on the visual selected and the report options. The details for each option will be covered.&lt;/p&gt;
&lt;h3 id="data-with-current-layout"&gt;Data with current layout
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Screen grab from Excel showing data in the same layout as the table in the report." class="gallery-image" data-flex-basis="407px" data-flex-grow="169" height="323" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_002.jpg" width="549"&gt;&lt;/p&gt;
&lt;p&gt;This option is only available on Table or Matrix visuals. It creates an Excel file with almost exactly the same layout. The file is a pure export and does not include a refresh.&lt;/p&gt;
&lt;h3 id="summarized-data"&gt;Summarized Data
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Screenshot from Excel showing all columns of data used to build the visual in a table layout" class="gallery-image" data-flex-basis="462px" data-flex-grow="192" height="353" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_003.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Assuming the admin and report creator have allowed export, this option is available for most visuals. When selected it has three possibilities. The live connection is only available if you have contributor or higher access, i.e. its not available if you have Viewer access.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Excel with live connection, 500,000 row max.Live connection means the data can be refreshed at a future time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Excel, 150,000 row maxExport without refresh.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CSV file, 30,000 row maxCSV cannot include a refresh.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="underlying-data"&gt;Underlying Data
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Screenshot of an Excel showing all the " class="gallery-image" data-flex-basis="514px" data-flex-grow="214" height="317" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_004.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This option is only available if the report creator has enabled it. (See Report Setting Options below) It exposes more columns than summarized. In this example it exports all the columns from the fact table, the 2 columns from the dimension table used and the measure used.&lt;/p&gt;
&lt;h2 id="applied-filters-in-export-data"&gt;Applied Filters in Export Data
&lt;/h2&gt;&lt;p&gt;When the data is exported, the exported data will be filtered with the report filters applied. Then the filter details are included in Excel files. CSV files will be filtered but will not include the details.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot from Excel showing the applied filter to the export data" class="gallery-image" data-flex-basis="688px" data-flex-grow="286" height="237" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_005.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="report-setting-options"&gt;Report Setting Options
&lt;/h2&gt;&lt;p&gt;A report creator can control if report readers can export data from the report. These settings are found under File – Options, CURRENT REPORT – Report settings. Then look under Export data. The first option is the default and will allow Data with Current Layout and Summarized data. When option 2 is selected, underlying data export is enabled as well. Option 3 disables all exports from this report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Report settings dialog for Export Data" class="gallery-image" data-flex-basis="248px" data-flex-grow="103" height="656" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_006.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="admin-options"&gt;Admin Options
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Admin options for Export Data" class="gallery-image" data-flex-basis="340px" data-flex-grow="141" height="480" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/export-data-from-power-bi-visuals/Export_007.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Power Admins have ultimate control over this feature. There are 3 features they can restrict, enable or disable. These options are Export to Excel, Export to csv and Users can work with Power BI datasets. Disabling the third option will disable files having a live refresh.&lt;/p&gt;
&lt;p&gt;Also by using security groups, you can restrict any of these features to limited users across the tenancy.&lt;/p&gt;
&lt;h2 id="data-export-conclusion"&gt;Data Export Conclusion
&lt;/h2&gt;&lt;p&gt;Educating users in good practice on using these features will help your strong Excel users feel more comfortable. I can understand companies restricting parts of this, but I would hope it is not just a blanket ban hoping this will speed up adoption of Power BI. In my experience it will just make some people more stubborn. Stubborn workarounds will be shadow IT and increase your technical debt.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;p&gt;The UK Weather pbix file is on my github site – &lt;a class="link" href="https://github.com/Laura-GB/DemoData#video-and-blog-resources" target="_blank" rel="noopener"
 &gt;https://github.com/Laura-GB/DemoData#video-and-blog-resources&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – 5 Stars SVG</title><link>https://hatfullofdata.blog/power-bi-5-stars-svg/</link><pubDate>Sat, 25 Feb 2023 22:57:38 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-5-stars-svg/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-5-stars-svg/cover.png" alt="Featured image of post Power BI – 5 Stars SVG" /&gt;&lt;p&gt;In the Feb 2023 Power BI Update they introduced image width in a table formatting. This means SVG images now don’t have to be square, so we can now do rectangle images. So I ported Stars SVG code I had in my Power Apps series and added this post to my Power BI SVG series&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Introduction to SVG Basics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-2/" target="_blank" rel="noopener"
 &gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-3/" target="_blank" rel="noopener"
 &gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-4/" target="_blank" rel="noopener"
 &gt;Using Text in SVG&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-5/" target="_blank" rel="noopener"
 &gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-6-new-icon-conditional-formatting/" target="_blank" rel="noopener"
 &gt;SVG Icons in Conditional Formatting&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-7-using-theme-svg-icons/" target="_blank" rel="noopener"
 &gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-5-stars-svg/" target="_blank" rel="noopener"
 &gt;Feb 2023 Update – 5 SVG Stars&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For this post we are using a table of events that have a rating score. I want to add a visual version of the rating to the table visual.&lt;/p&gt;
&lt;p&gt;Resources for this post and video can be found at &lt;a class="link" href="https://github.com/Laura-GB/DemoData/" target="_blank" rel="noopener"
 &gt;https://github.com/Laura-GB/DemoData/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table with events and rating column with Stars SVG on the end." class="gallery-image" data-flex-basis="423px" data-flex-grow="176" height="376" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-5-stars-svg/stars_000.png" width="663"&gt;&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/gGOQg7G86jw" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube snapshot" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-5-stars-svg/Power-BI-5-Stars-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="draw-1-star-svg"&gt;Draw 1 Star SVG
&lt;/h2&gt;&lt;p&gt;The first step is a measure to draw a single star. That starts with the SVG essentials similar to previous examples and the basic star shape. We need to remember to change Data Category the measure is an Image URL under data category and then add it to the table&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;span class="lnt"&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Stars = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// star shapes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star1 = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star1 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The default image size will be too big. In the formatting for the table, change the image size. I’ve used 30 px, pick a size that works for you.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Changing the image size to 30 px." class="gallery-image" data-flex-basis="392px" data-flex-grow="163" height="416" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-5-stars-svg/stars_001.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="draw-5-stars-svg"&gt;Draw 5 Stars SVG
&lt;/h2&gt;&lt;p&gt;In order to draw 5 stars in a row the view box needs to be expanded to fit them all in. So the svg_start needs to change to 500 100. This will mean that the above width will also need to change. One star is 30 px, so 5 stars will need a width of 150 px.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adjusting the image width to 150 px" class="gallery-image" data-flex-basis="440px" data-flex-grow="183" height="370" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-5-stars-svg/stars_002.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;Then we need to draw 5 stars in a row. We can use GENERATESERIES to create a table with numbers 0,100..400 so we can draw a star at 0,0 and 100,0 etc. That can be used inside a CONCATENATEX to create 5 groups. Each group will use a transform, translate to position each star.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Stars = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// star shapes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star1 = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star5 = CONCATENATEX(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATESERIES(0,400,100),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star1 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star5 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Table with 5 black stars on each row" class="gallery-image" data-flex-basis="477px" data-flex-grow="198" height="252" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-5-stars-svg/stars_003.png" width="501"&gt;&lt;/p&gt;
&lt;h2 id="grey-star-outlines"&gt;Grey Star Outlines
&lt;/h2&gt;&lt;p&gt;The first layer of stars is outline stars so we need to put the 5 stars in a group with a white fill and 1 point black outline.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Stars = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// star shapes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star1 = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star5 = CONCATENATEX(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATESERIES(0,400,100),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star1 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Defs
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Coloured Stars
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR GreyStars = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star5 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; GreyStars &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Table with 5 outline stars on each row" class="gallery-image" data-flex-basis="477px" data-flex-grow="198" height="249" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-5-stars-svg/stars_004.png" width="495"&gt;&lt;/p&gt;
&lt;h2 id="define-clip-path"&gt;Define Clip Path
&lt;/h2&gt;&lt;p&gt;The gold stars need clipping to match the rating score. 5 stars is 500 wide so a rating of 2 needs the gold stars clipped at 200, and 3.5 at 350 etc. We use variable ClipWidth to store this. To clip an image we use the and tags. The clipPath includes an id so it can be used later. The clipped area is a rectangle from with a height of 100 and a width of ClipWidth.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Stars = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// star shapes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star1 = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star5 = CONCATENATEX(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATESERIES(0,400,100),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star1 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Defs
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR ClipWidth = [Avg Rating] * 100
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Defs = &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Coloured Stars
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR GreyStars = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star5 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; GreyStars &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="draw-clipped-gold-stars"&gt;Draw Clipped Gold Stars
&lt;/h2&gt;&lt;p&gt;The last step is to draw the 5 gold stars using the clip path. So we use another group, apply a fill of gold and the clip path. The clip path name&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Stars = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// star shapes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star1 = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Star5 = CONCATENATEX(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; GENERATESERIES(0,400,100),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star1 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Defs
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR ClipWidth = [Avg Rating] * 100
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR Defs = &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Coloured Stars
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR GreyStars = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star5 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;VAR GoldStars = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Star5 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Defs &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; GreyStars &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; GoldStars &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The width addition to images in tables and matrix opens up lots of possibilities to use images in tables. There are lots of ideas for visuals to add to a table or matrix.Kerry Kolosko has some brilliant templates to get you started at &lt;a class="link" href="https://kerrykolosko.com/portfolio/" target="_blank" rel="noopener"
 &gt;https://kerrykolosko.com/portfolio/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Take Over a Dataset</title><link>https://hatfullofdata.blog/power-bi-take-over-a-dataset/</link><pubDate>Thu, 24 Nov 2022 14:24:00 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-take-over-a-dataset/</guid><description>&lt;p&gt;A published dataset in the Power BI service is owned by one account, often a person. People change jobs, move projects so that dataset is no longer part of their job. So another accounts need to take over that dataset so the connected reports can get refreshed data. This post will walk you through the simple steps with a few words of caution along the way.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=0D_n62aghqI" target="_blank" rel="noopener"
 &gt;&lt;img alt="Thumbnail from YourTube video" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-take-over-a-dataset/Power-BI-Take-Over-Dataset-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="initial-dataset"&gt;Initial Dataset
&lt;/h2&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="425px" data-flex-grow="177" height="384" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-take-over-a-dataset/Takeover_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click the three dots on a dataset and select Settings. At the the top of the Settings window we can see AmyA currently has control of the Account report dataset. So this account, DanJ cannot edit scheduled refreshes, edit parameters etc. If Amy’s account gets deactivated then the refreshes will fail.&lt;/p&gt;
&lt;h2 id="perform-take-over"&gt;Perform Take over
&lt;/h2&gt;&lt;p&gt;Before Dan clicks Take over it is very important to make sure Dan has access to the data sources that this report uses. If Dan does not have access and continues, they could break the connections and therefore break the refresh on this report.&lt;/p&gt;
&lt;p&gt;When Dan clicks on the Take over button, it displays a warning message.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Take over dataset warning message" class="gallery-image" data-flex-basis="820px" data-flex-grow="341" height="199" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-take-over-a-dataset/Takeover_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When Dan clicks Take over the stored credentials are deleted so the credentials will show an error. In this example there is only one data source so only one set of credentials. Click on Edit credentials for each set of credentials and login or enter credentials.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The credentials will show an error." class="gallery-image" data-flex-basis="1066px" data-flex-grow="444" height="153" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-take-over-a-dataset/Takeover_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once all the credentials have been updated Dan can now configure everything on the dataset. If Amy looks at the dataset they will be able to see Dan has completed the take over. You must have at least Contributor access to the workspace to do this.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Dataset settings once complete" class="gallery-image" data-flex-basis="175px" data-flex-grow="73" height="875" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-take-over-a-dataset/Takeover_005.png" width="640"&gt;&lt;/p&gt;
&lt;h2 id="take-over--word-of-caution"&gt;Take Over – Word of Caution
&lt;/h2&gt;&lt;p&gt;There is no undo. If you do not have credentials for the data sources used in the dataset the refresh will no longer work for import sources and the whole report won’t work for direct query reports. So I highly recommend doing this before your report builder leaves the company and a full handover is completed.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Connecting to Google Analytics</title><link>https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/</link><pubDate>Tue, 22 Nov 2022 09:24:52 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/</guid><description>&lt;p&gt;When I started my WordPress blog I added a Google Analytics plugin. This allows me to track visitors to my blog. So now I have a few years worth of data to load into a Power BI report. Power BI has a Google Analytics connector. This blog post is to walk through building a simple report on my blog visitors.&lt;/p&gt;
&lt;h3 id="youtube-video"&gt;YouTube Video
&lt;/h3&gt;&lt;p&gt;For those who prefer a video guide.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=AdvAq-B6ZWg" target="_blank" rel="noopener"
 &gt;&lt;img alt="Thumbnail from YouTube video" class="gallery-image" data-flex-basis="470px" data-flex-grow="195" height="347" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/Power-BI-and-Google-000.png" width="680"&gt;&lt;/a&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=AdvAq-B6ZWg" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=AdvAq-B6ZWg&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="creating-the-connection-to-google-analytics"&gt;Creating the connection to Google Analytics
&lt;/h3&gt;&lt;p&gt;In Power BI desktop the connector can be found under Get Data &amp;gt; More and then Online Services.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Connections dialog box" class="gallery-image" data-flex-basis="386px" data-flex-grow="161" height="385" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/Google-Analytics-001.jpg" width="620"&gt;&lt;/p&gt;
&lt;p&gt;The connector relies on a third party, i.e. Google. Therefore Power BI shows a message warning the connector user that Microsoft can’t guarantee the connector will always work correctly. Google will also confirm that its okay for Power BI to connect to your Google Analytics.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Warning messages for connecting Google Analytics to Power BI" class="gallery-image" data-flex-basis="475px" data-flex-grow="198" height="343" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/Google-Analytics-002-1.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="selecting-fields"&gt;Selecting Fields
&lt;/h3&gt;&lt;p&gt;When the connection is established the Navigator dialog lists all the fields grouped in folders. The fields have two types, Dimensions and Measures. Every report must include at least one of each. For this example I select from the Time folder, Date and Month of Year as the dimensions. Then from the Page Tracking folder I select the measure Pageviews. Finally I click Load to get the data into my report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Navigator pane showing Pageviews ticked and some Google Analytics data" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="544" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/Google-Analytics-004.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="quick-chart"&gt;Quick Chart
&lt;/h3&gt;&lt;p&gt;A quick column chart, using Month of Year and Pageviews shows the page views over the past few years.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Column chart showing pageviews over time." class="gallery-image" data-flex-basis="709px" data-flex-grow="295" height="230" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/Google-Analytics-005.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-more-fields-from-google-analytics"&gt;Adding more fields from Google Analytics
&lt;/h3&gt;&lt;p&gt;Google analytics has many more dimensions and measures to explore. After you click on Transform and return to Power Query you can see the applied steps. My first attempt to add more dimensions to the query was to click on the cog next to Added Items. This gives you can error so you cannot just modify that step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Picture of applied steps from Power Query and the error message “Add Items We cannot modify this step because there are errors in previous steps. Please resolve those errors first." class="gallery-image" data-flex-basis="680px" data-flex-grow="283" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/Google-Analytics-006.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The error is not a problem. Instead of modifying the existing step, the easiest method to add new dimensions is to add a new step. On the Cube Tools – Manage ribbon, click on Add Items. For this example I added the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Geo Network&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Continent&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Country&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Platform or Device&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Browser&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Users&lt;/p&gt;
&lt;p&gt;After adding the new items, I return to the report and add slicers and more visuals.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Switch Dataverse Tenancy</title><link>https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/</link><pubDate>Tue, 01 Nov 2022 12:47:36 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/cover.png" alt="Featured image of post Power BI – Switch Dataverse Tenancy" /&gt;&lt;p&gt;Connecting to Dataverse with Power BI to report on the business data is becoming easier and more common. One difference with connecting to Dataverse is there are two connectors involved. One to list the available environments and the second to connect to the data. Occasionally you need to change to point to a different tenancy which means changing the first connector to switch Dataverse tenancy.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=KbZK5Uog5ls" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube video thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/Power-BI-Switch-Dataverse-Tenancy-Time-0_00_0000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="starting-point"&gt;Starting Point
&lt;/h2&gt;&lt;p&gt;&lt;img alt="Dataverse button on the Home ribbon" class="gallery-image" data-flex-basis="737px" data-flex-grow="307" height="210" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/switchtenancy_003.png" width="645"&gt;&lt;/p&gt;
&lt;p&gt;When I click Dataverse on the Home ribbon the navigator shows me where I last connected. I need to connect to a different tenancy for this report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Navigator window showing the wrong tenancy" class="gallery-image" data-flex-basis="354px" data-flex-grow="147" height="320" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/switchtenancy_001-1.png" width="473"&gt;&lt;/p&gt;
&lt;h2 id="switch-dataverse-tenancy"&gt;Switch Dataverse Tenancy
&lt;/h2&gt;&lt;p&gt;You need to change the login for the Dataverse login. From the Home ribbon, click the down arrow on Transform data and select Data source settings. In the Data source settings dialog select Global permissions. Then select Dataverse and select Edit Permissions.&lt;/p&gt;
&lt;p&gt;&lt;img alt="3 steps to switch Dataverse tenancy." class="gallery-image" data-flex-basis="310px" data-flex-grow="129" height="525" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/switchtenancy_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the Edit Permissions dialog click on the Edit button. This will prompt you to login to the different tenancy. If you do not have a Privacy Level selected I recommend you select one, often Organizational will fit most data sources. It will depend upon your company’s policy.&lt;/p&gt;
&lt;h2 id="result"&gt;Result
&lt;/h2&gt;&lt;p&gt;Now when I click on the Dataverse button I get the list of environments on the different tenancy.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Navigator dialog showing successful switch Dataverse tenancy" class="gallery-image" data-flex-basis="337px" data-flex-grow="140" height="350" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/switchtenancy_004.png" width="492"&gt;&lt;/p&gt;
&lt;p&gt;The Dataverse connector is only used to populate the Dataverse Navigator window. Switching the tenancy will not break any other reports. If all you do is report from one tenancy you will never have to do this. Though I’ve been asked to explain this multiple times.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI &amp; Dataverse – Choice Columns</title><link>https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/</link><pubDate>Sat, 24 Sep 2022 19:24:07 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/cover.jpg" alt="Featured image of post Power BI &amp; Dataverse – Choice Columns" /&gt;&lt;h3 id="choices-and-choice-column-introduction"&gt;Choices and Choice Column Introduction
&lt;/h3&gt;&lt;p&gt;When a choice column is created in a Dataverse table the developer can either select a pre-made list of choices or create a custom list of choices. In a Power BI model it helps to add the dimension table of those values.&lt;/p&gt;
&lt;p&gt;The difference between a choice and choices column is how many choices can be picked. A choice column only allows one choice and a choices columns column allows multiple values to be added. So if we take dish from our menu then the menu section, eg starter, main, side would be a choice but the allergens such as gluten, dairy etc could be a choices column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Example of a choices drop down and a choice column." class="gallery-image" data-flex-basis="1174px" data-flex-grow="489" height="139" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/Dataverse-Update-007.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="choice-column-in-power-bi"&gt;Choice Column in Power BI
&lt;/h3&gt;&lt;p&gt;When the table is loaded into Power BI there are two columns for the choice column. The first column is the number that refers to the choice in the choices list and the second column is the value from the choice list. The limitation of using the name column is only selected values will in your data and it will slow down the refresh of the data.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="617px" data-flex-grow="257" height="196" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/dataversechoice_005.jpg" width="504"&gt;&lt;/p&gt;
&lt;h3 id="choices-column-in-power-bi"&gt;Choices Column in Power BI
&lt;/h3&gt;&lt;p&gt;When the table is loaded into Power BI there is a single column for the choices column. This column contains numbers separated by commas. Each of these numbers refers to a choice in the choices list. Using the Dataverse connection, there is no easy to get the choice values.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Allergens column showing numbers separated by commas" class="gallery-image" data-flex-basis="558px" data-flex-grow="232" height="119" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/Choices_004-1.jpg" width="277"&gt;&lt;/p&gt;
&lt;h3 id="using-the-web-api-to-get-choice-lists"&gt;Using the Web API to get choice lists
&lt;/h3&gt;&lt;p&gt;Choice are part of the table and columns definition and one of the four paths exposed is Global Option Set Definitions. Choices and Options are the same thing in this context. Microsoft give us the path on this page&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/use-web-api-metadata" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/use-web-api-metadata&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The path given is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[Organization URI]/api/data/v9.0/GlobalOptionSetDefinitions
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you navigate to that url in your environment you will get JSON data. Then exploring the JSON we can find the Name of the choice list. Expanding Options we get the Value which matches the values in the choices column in our table. Expanding Label and then UserLocalizedLabel we get the Label value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="JSON code with the parts to expand and keep highlighted" class="gallery-image" data-flex-basis="197px" data-flex-grow="82" height="827" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/Choices_005.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Using the Web Connector to link to the JSON we can connect. Power Query decides to expand everything for you. I deleted all the steps except Source and expanded only the columns I needed.&lt;/p&gt;
&lt;p&gt;Before I add the list I create a parameter called Environment to store the path to the my Dataverse environment, eg orgdaae212f.crm11.dynamics.com.&lt;/p&gt;
&lt;p&gt;Then this code gives you the list of all the choice lists in your environment. I save this as one query which is not loaded and then I add referenced queries for each choice list that I want to include in my report.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Source = Json.Document(Web.Contents(&amp;#34;https://&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Environment &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;/api/data/v9.0/GlobalOptionSetDefinitions&amp;#34;)),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; value = Source[value],
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Converted to Table&amp;#34; = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Expanded Column1&amp;#34; = Table.ExpandRecordColumn(#&amp;#34;Converted to Table&amp;#34;, &amp;#34;Column1&amp;#34;, {&amp;#34;Name&amp;#34;, &amp;#34;Options&amp;#34;}, {&amp;#34;Name&amp;#34;, &amp;#34;Options&amp;#34;}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Expanded Options&amp;#34; = Table.ExpandListColumn(#&amp;#34;Expanded Column1&amp;#34;, &amp;#34;Options&amp;#34;),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Expanded Options1&amp;#34; = Table.ExpandRecordColumn(#&amp;#34;Expanded Options&amp;#34;, &amp;#34;Options&amp;#34;, {&amp;#34;Value&amp;#34;, &amp;#34;Label&amp;#34;}, {&amp;#34;Value&amp;#34;, &amp;#34;Label&amp;#34;}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Expanded Label&amp;#34; = Table.ExpandRecordColumn(#&amp;#34;Expanded Options1&amp;#34;, &amp;#34;Label&amp;#34;, {&amp;#34;UserLocalizedLabel&amp;#34;}, {&amp;#34;UserLocalizedLabel&amp;#34;}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Expanded UserLocalizedLabel&amp;#34; = Table.ExpandRecordColumn(#&amp;#34;Expanded Label&amp;#34;, &amp;#34;UserLocalizedLabel&amp;#34;, {&amp;#34;Label&amp;#34;}, {&amp;#34;Label&amp;#34;}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Changed Type&amp;#34; = Table.TransformColumnTypes(#&amp;#34;Expanded UserLocalizedLabel&amp;#34;,{{&amp;#34;Name&amp;#34;, type text}, {&amp;#34;Value&amp;#34;, Int64.Type}, {&amp;#34;Label&amp;#34;, type text}}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Renamed Columns&amp;#34; = Table.RenameColumns(#&amp;#34;Changed Type&amp;#34;,{{&amp;#34;Name&amp;#34;, &amp;#34;Choice List&amp;#34;}, {&amp;#34;Value&amp;#34;, &amp;#34;Choice Value&amp;#34;}, {&amp;#34;Label&amp;#34;, &amp;#34;Choice Name&amp;#34;}})
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;in
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; #&amp;#34;Renamed Columns&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="result"&gt;Result
&lt;/h3&gt;&lt;p&gt;After you add the above code, you get a table of all the options available. Then using reference and a filter and the choice dimension tables can be created.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Illustration showing the long list of option values to create choice and choices dimension tables" class="gallery-image" data-flex-basis="694px" data-flex-grow="289" height="235" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/dataversechoice_006.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Its not pretty, its not clean and I’d prefer a straight forward connector. It works for now though and until there is another method that works this is the method I’ll use. If there is another method please correct me via the comments below and I’ll correct my post!&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Dataverse Connector – July 2022 Update</title><link>https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/</link><pubDate>Thu, 01 Sep 2022 16:33:32 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/cover.png" alt="Featured image of post Power BI Dataverse Connector – July 2022 Update" /&gt;&lt;p&gt;In the July 2022 Power BI update, they updated the Dataverse connector. The connector now uses the display names from a Dataverse table. Dataverse columns have internal name and display names and previously the display names were not available.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;For those who prefer a video version.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=7dVrFPX9hzY" target="_blank" rel="noopener"
 &gt;&lt;img alt="Video thumbnail" class="gallery-image" data-flex-basis="427px" data-flex-grow="178" height="382" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/dataverseupdate-video-thumbnail.jpg" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="new-connection"&gt;New Connection
&lt;/h3&gt;&lt;p&gt;Let’s start with a brand new Dataverse connection. When you click on the Dataverse button the dialog appears as before. When you select a table it still shows the internal names of the columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Dataverse connector navigator dialog" class="gallery-image" data-flex-basis="658px" data-flex-grow="274" height="248" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/Dataverse-Update-001.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you click Transform and Power Query opens it still shows the internal names. So I select a few columns and then click Close and Apply. When the data appears in Power BI desktop it now shows the display names. If a column does not have a display name such as statecodename it shows the internal name.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table views from Power Query and Power BI desktop table view to show the change in names." class="gallery-image" data-flex-basis="315px" data-flex-grow="131" height="517" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/Dataverse-Update-002.jpg" width="680"&gt;Power Query and Power BI Desktop views&lt;/p&gt;
&lt;p&gt;When I experimented I found that even if you renamed the columns within Power Query the name within Power BI desktop did not change. And if you changed the name in Power BI desktop it did not push back into Power Query as it does with other connectors.&lt;/p&gt;
&lt;h3 id="exploring-with-tabular-editor"&gt;Exploring with Tabular Editor
&lt;/h3&gt;&lt;p&gt;Opening the model in Tabular Editor 2 we can see that the column has two names. So the source column has a different value to the Name property.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Exploring the dataverse connector data in Tabular Editor 2" class="gallery-image" data-flex-basis="399px" data-flex-grow="166" height="409" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/Dataverse-Update-003.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="updating-an-existing-model"&gt;Updating an Existing Model
&lt;/h3&gt;&lt;p&gt;I created a Power BI model in an earlier version of Power that used the old Dataverse connector. It contains the Account table with columns renamed in Power Query and a measure to count the Account table records.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="412px" data-flex-grow="171" height="396" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/Dataverse-Update-004.jpg" width="680"&gt;Report before refresh&lt;/p&gt;
&lt;p&gt;When I opened the file in the July 2022 version of Power BI with the new Dataverse Connector, it looked unchanged. When the report is refreshed in Power BI desktop the connector is updated. The column names change and measures update and still work.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="399px" data-flex-grow="166" height="409" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/Dataverse-Update-005-1.jpg" width="680"&gt;Report after refresh with updated column names&lt;/p&gt;
&lt;h3 id="exceptions"&gt;Exceptions
&lt;/h3&gt;&lt;p&gt;If the table from Dataverse is transformed using a reference the display names do not come through. I have not explored all the combinations as to which break the new update so please be aware.&lt;/p&gt;
&lt;h3 id="conclusion-on-dataverse-connector"&gt;Conclusion on Dataverse Connector
&lt;/h3&gt;&lt;p&gt;The update to the dataverse connector makes this connector work differently to other connectors. This update works well if all the transformation does is reduce the columns and filter the rows. This will work for many reports.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Automate Child Flow</title><link>https://hatfullofdata.blog/power-automate-child-flow/</link><pubDate>Thu, 14 Jul 2022 12:34:07 +0000</pubDate><guid>https://hatfullofdata.blog/power-automate-child-flow/</guid><description>&lt;img src="https://hatfullofdata.blog/power-automate-child-flow/cover.jpg" alt="Featured image of post Power Automate Child Flow" /&gt;&lt;p&gt;Occasionally it is useful to break your flow apart into separate flows. For this you need to create a child flow or two. There is one tweak I always forget, hence this post.&lt;/p&gt;
&lt;h3 id="create-the-child-flow"&gt;Create the Child Flow
&lt;/h3&gt;&lt;p&gt;When building child flows you need to follow these rules&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Child flows need to be built inside a solution&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The trigger needs to be a Manually trigger a flow. Add inputs to the trigger.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To return values back to the parent flow the last action should a Respond to PowerApp of Flow action.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Child flow with showing Manual trigger, get weather action and Respond to Power App action" class="gallery-image" data-flex-basis="206px" data-flex-grow="86" height="789" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-child-flow/Child-Flows-001.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Above is a very simple example. The trigger has an input of location and the child flow will return 3 values.&lt;/p&gt;
&lt;h3 id="calling-the-child-flow"&gt;Calling the Child Flow
&lt;/h3&gt;&lt;p&gt;Now you have created your child flow and tested that it works you can now call it. In the parent flow, add the action Run a child flow. Select your child flow and populate the inputs.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Snapshot showing the Run a child flow in the action list and the Run a child flow action once added to your flow" class="gallery-image" data-flex-basis="1227px" data-flex-grow="511" height="133" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-child-flow/Child-Flows-002.jpg" width="680"&gt;As soon as you add this you will probably get an error in the flow checker. Stating “Update the child flow for action ‘Run a child flow’ to not use ‘run-only user’ connections”&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen showing a red dot next to flow checker in the flow window and then the results if you click on flow checker" class="gallery-image" data-flex-basis="295px" data-flex-grow="123" height="552" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-child-flow/Child-Flows-003.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="fixing-the-child-flow"&gt;Fixing the Child Flow
&lt;/h3&gt;&lt;p&gt;Return back to the child flow information page. In the bottom right of the window look for Run only users box. When you have found it, click Edit. For each connection change the Provided by run-only user to the connection listed. You get a dialog stating the run-only users only get access to the connections for this flow. Click OK.&lt;/p&gt;
&lt;p&gt;&lt;img alt="pictures showing the steps from run only users to connections used " class="gallery-image" data-flex-basis="422px" data-flex-grow="176" height="386" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-automate-child-flow/Child-Flows-004.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you have updated all the connections remember to click save.&lt;/p&gt;
&lt;p&gt;You can now return to the parent flow. You might need to re-add the action but you will no longer get an error.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Child flows are a great way to re-use logic and break a process down into manageable parts.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Charticulator Resources</title><link>https://hatfullofdata.blog/charticulator-resources/</link><pubDate>Mon, 27 Jun 2022 08:26:01 +0000</pubDate><guid>https://hatfullofdata.blog/charticulator-resources/</guid><description>&lt;img src="https://hatfullofdata.blog/charticulator-resources/cover.png" alt="Featured image of post Power BI Charticulator Resources" /&gt;&lt;p&gt;&lt;img alt="Charticulator Icon" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="256" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-resources/Charticulator-Icon.png" width="256"&gt;&lt;/p&gt;
&lt;p&gt;Creating custom visuals using the Charticulator visual in Power BI is not 100% intuitive. So here are some links to some Charticulator resources I’ve used to skill up and some resources I’ve created.&lt;/p&gt;
&lt;h3 id="microsofts-resources"&gt;Microsoft’s Resources
&lt;/h3&gt;&lt;p&gt;Charticulator was created by Microsoft Research and is Open Source. So they have some great Charticulator resources to help you get started.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Charticulator Website – &lt;a class="link" href="https://charticulator.com/" target="_blank" rel="noopener"
 &gt;https://charticulator.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Microsoft’s Announcement – &lt;a class="link" href="https://powerbi.microsoft.com/en-us/blog/announcing-the-new-charticulator-visual-public-preview/" target="_blank" rel="noopener"
 &gt;https://powerbi.microsoft.com/en-us/blog/announcing-the-new-charticulator-visual-public-preview/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Microsoft’s GitHub of Resources – &lt;a class="link" href="https://github.com/microsoft/charticulator" target="_blank" rel="noopener"
 &gt;https://github.com/microsoft/charticulator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Research Team Video – &lt;a class="link" href="https://www.youtube.com/watch?v=5EZq4QolNy4" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=5EZq4QolNy4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="blogs-and-videos"&gt;Blogs and Videos
&lt;/h3&gt;&lt;p&gt;One great resource to help me get started was the tutorials by Burning Suit. They’ve even written an brilliant book on the topic. Also other content creators have videos and blogs all with some great ideas and different ways to get you started.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;BurningSuit – &lt;a class="link" href="https://www.burningsuit.co.uk/charticulator-in-power-bi-1/" target="_blank" rel="noopener"
 &gt;https://www.burningsuit.co.uk/charticulator-in-power-bi-1/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;And their book – &lt;a class="link" href="https://www.burningsuit.co.uk/our-book-introducing-charticulator-for-power-bi/" target="_blank" rel="noopener"
 &gt;https://www.burningsuit.co.uk/our-book-introducing-charticulator-for-power-bi/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Paul Turley’s Slide Deck – &lt;a class="link" href="https://sqlserverbi.blog/wp-content/uploads/2019/09/can-you-say-charticulator-paul-turley.pdf" target="_blank" rel="noopener"
 &gt;https://sqlserverbi.blog/wp-content/uploads/2019/09/can-you-say-charticulator-paul-turley.pdf&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enterprise DNA Video – &lt;a class="link" href="https://www.youtube.com/watch?v=ORKTLUAFXnI" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=ORKTLUAFXnI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RADACAD’s Introduction Video – &lt;a class="link" href="https://www.youtube.com/watch?v=xtyxTNnEvnw" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=xtyxTNnEvnw&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="my-charticulator-resources"&gt;My Charticulator Resources
&lt;/h3&gt;&lt;p&gt;How I learn new topics is by creating content to share. So I’ve created a blog post and a few videos. I need to create more and they are coming.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple Chart Post – &lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/charticulator-simple-custom-chart/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Simple Chart Video – &lt;a class="link" href="https://www.youtube.com/watch?v=G7YtRPnoc7M" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=G7YtRPnoc7M&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Grid Chart – &lt;a class="link" href="https://www.youtube.com/watch?v=Hb56crKEJN4" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=Hb56crKEJN4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Heat Map – &lt;a class="link" href="https://www.youtube.com/watch?v=kz2b1tchFJo" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/watch?v=kz2b1tchFJo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;After reading this, please let me know if this was useful. Then please point out the links I’ve missed out. There are other great custom visual options out there and Charticulator has its place amongst the great ones.&lt;/p&gt;</description></item><item><title>Power BI Charticulator Simple Custom Chart</title><link>https://hatfullofdata.blog/charticulator-simple-custom-chart/</link><pubDate>Fri, 07 Jan 2022 10:24:29 +0000</pubDate><guid>https://hatfullofdata.blog/charticulator-simple-custom-chart/</guid><description>&lt;img src="https://hatfullofdata.blog/charticulator-simple-custom-chart/cover.png" alt="Featured image of post Power BI Charticulator Simple Custom Chart" /&gt;&lt;p&gt;In late 2021, the Charticulator visual was added to Power BI desktop. This post walks through creating a Charticulator Simple Custom Chart. The chart will show the drink preference split of 20 office colleagues. The steps assume you already have connected to the data. The data is available for download or direct connection here:&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2021/12/Drinks.xlsx" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2021/12/Drinks.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Final Charticulator Simple Custom Chart " class="gallery-image" data-flex-basis="605px" data-flex-grow="252" height="253" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_101.png" width="638"&gt;&lt;/p&gt;
&lt;h3 id="charticulator-series"&gt;Charticulator Series
&lt;/h3&gt;&lt;p&gt;This series will build a number of different visuals using the Charticulator visual in Power BI desktop. Each post will include links to data sources, sample Power BI reports and any related YouTube videos.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple Chart&lt;/li&gt;
&lt;li&gt;Exporting and Importing Templates&lt;/li&gt;
&lt;li&gt;Allowing Export of Templates&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-video"&gt;YouTube Video
&lt;/h3&gt;&lt;p&gt;It’s coming!&lt;/p&gt;
&lt;h3 id="adding-the-charticulator-visual"&gt;Adding the Charticulator Visual
&lt;/h3&gt;&lt;p&gt;The Charticulator visual is a custom visual so needs to be added. In the visualisations pane, click on the three dots and then click on Get more visuals. Search for Charticulator. Then click on the icon to see the full description. Click Add to add the visual to this report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding the Charticulator visual" class="gallery-image" data-flex-basis="270px" data-flex-grow="112" height="604" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_102.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="start-creating-charticulator-simple-custom-chart"&gt;Start creating Charticulator Simple Custom Chart
&lt;/h3&gt;&lt;p&gt;Add the Charticulator visual to a report page. This visual needs the count of the people who prefer a drink. So I created a measure that counts the rows.&lt;/p&gt;
&lt;p&gt;&lt;img alt="People count measure equals count rows Drink Choice table." class="gallery-image" data-flex-basis="2456px" data-flex-grow="1023" height="64" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_103.png" width="655"&gt;&lt;/p&gt;
&lt;p&gt;Next I add Drink field and People Count measure to the Data of the visual. Once you have data added you can create the visual. So click on the three dots on the visual and select edit.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding fields to data and then clicking edit" class="gallery-image" data-flex-basis="439px" data-flex-grow="183" height="371" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_104.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the Charticulator pane appears, click Create Chart. Then the Charticulator editor window appears.&lt;/p&gt;
&lt;h3 id="creating-charticulator-simple-custom-chart"&gt;Creating Charticulator Simple Custom Chart
&lt;/h3&gt;&lt;p&gt;The Charticulator editor window has different areas. We are going to start by working with the Glyph area to define the shapes that will appear in the plot area.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Charticulator Editor" class="gallery-image" data-flex-basis="416px" data-flex-grow="173" height="392" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_105.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-shapes"&gt;Adding Shapes
&lt;/h3&gt;&lt;p&gt;The chart is made of a rectangle per drink with a width that corresponds to the number of people who prefer that drink. From the toolbar make sure the Marks button shows a rectangle and then drag the rectangle into the glyph area. The glyph area should now have a rectangle in it and the plot area 3 rectangles, one for each row of data from the three drink types.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding a shape to the Glyph." class="gallery-image" data-flex-basis="680px" data-flex-grow="283" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_106.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The 3 rectangles in the plot area are all the same size. We want the width to be linked to the people count value. Make sure you still have the shape selected. Then click on the link button next the Width box and select People Count. The plot area rectangles will now be different widths.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Linking the rectangle width to the People Count" class="gallery-image" data-flex-basis="560px" data-flex-grow="233" height="291" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_107.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Next we want the rectangles to be different colours. Further down the attributes pane there is a Fill property. Click on the link and select Drink. You can change the colours here as well if you want to.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Linking Rectangle colour to drink." class="gallery-image" data-flex-basis="587px" data-flex-grow="244" height="278" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_108.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The final step before me move on to text is to remove the gap between the rectangles. This is a property of Plot Segment. Start by selecting the PlotSegment1 in the Layers. Then scroll down the Attributes to find Gap. Reduce the Gap value down to 0.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Reducing gap between glyphs" class="gallery-image" data-flex-basis="798px" data-flex-grow="332" height="204" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_109.png" width="679"&gt;&lt;/p&gt;
&lt;h3 id="adding-text"&gt;Adding Text
&lt;/h3&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="113px" data-flex-grow="47" height="1024" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_110.png" width="484"&gt;&lt;/p&gt;
&lt;p&gt;A good alternative to adding a legend to a chart is to add labels. We are going to add 2 text objects to show the drink name and the people count. Drag a text item, show by A, into the glyph area. Keeping Text1 selected, we can update the attributes. Make the following changes&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Link the text to Drink&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Increase the Font size if required&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the Anchor Y to be bottom&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the color to be white&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note you can click on Glyph title to minimise that section of the pane to see more Attributes.&lt;/p&gt;
&lt;p&gt;Add another text object. Make very similar changes except link the Text to the People Count and the Anchor Y link to be Top so that the number is under the drink.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Charticulator Simple Custom Chart with white text" class="gallery-image" data-flex-basis="345px" data-flex-grow="143" height="473" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_111.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="formatting-numbers"&gt;Formatting Numbers
&lt;/h3&gt;&lt;p&gt;When you link a numeric column to a text object the calculation includes the formatting for the number. In the example below the second pair of {} includes the formatting. f = fixed point notation and the .1 means show 1 decimal place, so {.2f} would show 2 decimal places etc.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;${avg(`People Count`)}{.1f}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;You can change this to {.0f} to show no decimal places or you can use {d} which is decimal notation, rounded to integer. This notation is called d3 and more information can be found here.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://github.com/d3/d3-format#format" target="_blank" rel="noopener"
 &gt;https://github.com/d3/d3-format#format&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Changing the number format" class="gallery-image" data-flex-basis="305px" data-flex-grow="127" height="452" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_113.png" width="575"&gt;&lt;/p&gt;
&lt;h3 id="changing-plot-size"&gt;Changing Plot Size
&lt;/h3&gt;&lt;p&gt;By default the chart is 600 x 400. This would make the chart very square. Click on the Chart layer and reduce the height. You can also reduce the margins to make the chart fill more of the area.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Changing the plot size" class="gallery-image" data-flex-basis="466px" data-flex-grow="194" height="350" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/charticulator-simple-custom-chart/Charticulator_114.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="finishing-the-charticulator-simple-custom-chart"&gt;Finishing the Charticulator Simple Custom Chart
&lt;/h3&gt;&lt;p&gt;Finish editing the chart by clicking on Back to report. Click on Save to save your changes to the chart. Be aware as you re-size the chart the font size is fixed.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;This is the first post in a series on creating charts using the Charticulator visual. I will be looking at creating templates and how to create custom visuals. On the bottom of every post I will be including useful references. If I’m missing any please reach out&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://charticulator.com/docs/getting-started.html" target="_blank" rel="noopener"
 &gt;Charticulator Getting Started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.burningsuit.co.uk/charticulator-in-power-bi-1/" target="_blank" rel="noopener"
 &gt;Burning Suit Charticulator blog series&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=ORKTLUAFXnI" target="_blank" rel="noopener"
 &gt;Enterprise DNA Intro video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=xtyxTNnEvnw" target="_blank" rel="noopener"
 &gt;Radacad Intro Video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.youtube.com/playlist?list=PLn1m_aBmgsbH31NHXuT9ArgY5ZefuKESo" target="_blank" rel="noopener"
 &gt;Power BI Tips Charticulator Video Series&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Refreshing Datasets Automatically with Power BI Dataflows</title><link>https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/</link><pubDate>Sun, 29 Aug 2021 18:58:12 +0000</pubDate><guid>https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/</guid><description>&lt;img src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/cover.png" alt="Featured image of post Refreshing Datasets Automatically with Power BI Dataflows" /&gt;&lt;p&gt;&lt;img alt="Workspace showing the link from web to workspace to dataset to report." class="gallery-image" data-flex-basis="1305px" data-flex-grow="544" height="125" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/RefreshDataset_001-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I have a report, Open Issues, that has a Power BI dataflow as a data source. If I just use scheduled refreshes, my options are limited. I need to be refreshing datasets automatically after the dataflow has finished so my reports are up to date as soon as possible to avoid a situation where I schedule the dataflow to refresh at 10am and the next slot available might be 10:30am, for example. This can be done using Power Automate.&lt;/p&gt;
&lt;h3 id="create-a-flow-in-power-automate"&gt;Create a flow in Power Automate
&lt;/h3&gt;&lt;p&gt;Head to Power Automate at &lt;a class="link" href="https://flow.microsoft.com/" target="_blank" rel="noopener"
 &gt;https://flow.microsoft.com/&lt;/a&gt;and click on Create on the left hand side menu. The flow will be triggered by the dataflow refresh finishing. This means it is automated so click on Automated cloud flow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="screen grab of Power Automate showing location of Create button and Automated cloud flow button" class="gallery-image" data-flex-basis="528px" data-flex-grow="220" height="309" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/RefreshDataset_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;A dialog appears asking for details of the flow. You need to enter in a name for the flow. Then in the search box enter in power to find relevant triggers. Select When a dataflow refresh completes and click Create.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Build a flow dialog box" class="gallery-image" data-flex-basis="375px" data-flex-grow="156" height="435" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/RefreshDataset_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After you click Create the flow editor appears with the trigger already added. For Group Type select Workspace. Then you can select the workspace name for Group. Then you can select the Dataflow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Trigger step showing values set for Group Type, Group and Dataflow" class="gallery-image" data-flex-basis="500px" data-flex-grow="208" height="326" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/refreshissues_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We then need to refresh the connected report dataset. So we click New step. In the Choose an operation dialog, we type dataset into the search box. This will find you the action Refresh a dataset. We click on the action to add it to the flow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding the step for Refreshing datasets automatically" class="gallery-image" data-flex-basis="622px" data-flex-grow="259" height="262" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/refreshissues_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then you need to select the Workspace and Dataset in the action. The flow is complete, so we can click Save.&lt;/p&gt;
&lt;h3 id="testing-the-flow"&gt;Testing the Flow
&lt;/h3&gt;&lt;p&gt;The flow triggers when the dataflow finishes refreshing. If we refresh the dataflow that will test the flow. I clicked refresh on the dataflow at 3pm and it triggered the flow which then refreshed the dataset.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grabs of the workspace showing the refresh date and times and a screen grab from the flow runs showing the matching date and time." class="gallery-image" data-flex-basis="348px" data-flex-grow="145" height="468" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/refreshissues_005.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the workspace we can see the date and time of the refreshes and if the flow has worked correctly the dataset should be refreshed just after the dataflow. If you look at the history of the flow runs there should be a matching flow run just after the dataflow finished refreshing.&lt;/p&gt;
&lt;h3 id="when-refreshing-datasets-automatically-fails"&gt;When refreshing datasets automatically fails
&lt;/h3&gt;&lt;p&gt;It is worth pointing out that if the dataset refresh fails the flow will not reflect that and will show succeeded in the flow runs. So it is worth checking that the dataset can refresh successfully.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;This idea can be extended to refresh multiple datasets over multiple workspaces that are connected to the dataflow. This simplifies the process of scheduling refreshes. It also could allow for notifications to interested report owners to be told of the refreshes etc.&lt;/p&gt;
&lt;h2 id="more-power-automate-posts"&gt;More Power Automate Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/" target="_blank" rel="noopener"
 &gt;Creating Adaptive Cards&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-child-flow/" target="_blank" rel="noopener"
 &gt;Power Automate Child Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-get-data-from-a-power-bi-dataset/" target="_blank" rel="noopener"
 &gt;Get data from a Power BI dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-write-me-a-flow/" target="_blank" rel="noopener"
 &gt;Write Me a Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/connecting-power-automate-to-devops/" target="_blank" rel="noopener"
 &gt;Power Automate and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-save-a-file-to-onelake-lakehouse/" target="_blank" rel="noopener"
 &gt;Save a File to OneLake Lakehouse&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/trigger-microsoft-fabric-data-pipeline/" target="_blank" rel="noopener"
 &gt;Trigger Microsoft Fabric Data Pipeline using Power Automate&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>How much does that report cost the business?</title><link>https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/</link><pubDate>Tue, 06 Jul 2021 15:04:41 +0000</pubDate><guid>https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/</guid><description>&lt;p&gt;In nearly every business across the world, staff give reports to managers. How many people assess the report cost? The reports will show how well or badly the business is performing. Accurate reporting is important in every organisation. Management needs to be able to make data-driven decisions.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Lego characters hold a report and money to pay the report cost" class="gallery-image" data-flex-basis="346px" data-flex-grow="144" height="471" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/Costs.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Every report comes with a cost. Is the report worth that cost? Could there be improvements in the process to lower the report cost? The biggest cost is probably the effort from the report builders. In this post I am not covering how to make a report useful, I am just looking at the report cost.&lt;/p&gt;
&lt;p&gt;When I teach intro to Power BI I use a diagram to show the effort split. Far too often getting access to the data and transforming it into a structure you can model takes up more time than anything else.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Pyrmis showing Getting the data and transforming the data take more time" class="gallery-image" data-flex-basis="391px" data-flex-grow="163" height="417" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/Report-Effort-1024x628.png" width="680"&gt;Report Building Effort&lt;/p&gt;
&lt;p&gt;In an ideal world the above diagram would be wrong. Anyone can access the data they need, it is all easy and quick and the data is well structured so only needs the very basic transformations. If that is the case, superb, well done. If you are guessing that is the case, please do go and ask your report builders, you might be surprised at the effort they put in.&lt;/p&gt;
&lt;h3 id="get"&gt;Get
&lt;/h3&gt;&lt;p&gt;In so many companies the above diagram is accurate and it doesn’t have to be. So let us look at the “Get” stage. Often the process of getting access to the data is hard work and involves politics galore and the bigger the company the worse it is.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Lego character holding a map and binoculars" class="gallery-image" data-flex-basis="254px" data-flex-grow="105" height="642" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/Discover-2.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Is there a process of requesting access to company data? Is there a self-service data option? Are the limitations on who is allowed to connect properly governed? Do your staff even know how to find the required raw data?&lt;/p&gt;
&lt;p&gt;In one company there were 2 options, option one pay a yearly £10K per daily csv extract or option two extract the data in 10,000 rows blocks manually once you’ve worked out the queries you need to run. The option of connecting to an actual database wasn’t even an option. Its not a huge surprise they picked the 10,000 block extract option. So there were hours wasted every week of people extracting many blocks of data and sticking it back together. The hours were being done by highly skilled engineers who had better things to do.&lt;/p&gt;
&lt;p&gt;In another company the report builder wasn’t actually allowed access to the data but was asked to create a report. So shared screens, remote control and lots of faff and a report was built, every change involved the same games. All in the name of security.&lt;/p&gt;
&lt;p&gt;When I suggested the engineers time was worth more than 10K or pointed out the security was already broken, they shrugged their shoulders. No-one thought the management would or could do anything.&lt;/p&gt;
&lt;h3 id="transform"&gt;Transform
&lt;/h3&gt;&lt;p&gt;Once you have access to the data, how much transformation is required to make the data usable?&lt;/p&gt;
&lt;p&gt;&lt;img alt="Lego character looking at a tile with hieroglyphs on it" class="gallery-image" data-flex-basis="252px" data-flex-grow="105" height="647" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/hyroglyphs.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Let us start with a story. In this company big bookings are done on accounts, so the account needs to be recorded for discounts to be applied and account managers to get commission. The box to fill in the account name is free text and the business locations are across the world so the names are foreign to some. You can imagine the variations in spelling. So, every month the reporting team spend days refining their transformation routines to cope with new variations. Account managers spend hours doing multiple checks to make sure they have all their account booking assigned to them.&lt;/p&gt;
&lt;p&gt;All it needed was a drop down box. The booking system design team and the reporting team were in no way connected except by very senior management and no-one was telling them. So every month the hours were wasted and the account managers stressed. Before you assume this is a small company in 2019 their turnover was 21 billion dollars.&lt;/p&gt;
&lt;p&gt;This is one small example, I could bore you with hundreds of stories as could many of the data community. Badly captured data, extracts that are impossible to work with, constantly changing data structures are daily problems for report builders and often its due to a lack of big picture planning and people un-aware that data is used in a report.&lt;/p&gt;
&lt;h3 id="it-only-takes-20-minutes"&gt;It only takes 20 minutes
&lt;/h3&gt;&lt;p&gt;&lt;img alt="3 Lego characters holding 3 reports" class="gallery-image" data-flex-basis="318px" data-flex-grow="132" height="513" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/how-much-does-that-report-cost-the-business/three-reports.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;My final story is from a company which had daily stand-ups on every production line. They were an important part of how that business functioned. There were a few charts produced daily and when I asked about them the reply came back “It only takes 20 minutes”.&lt;/p&gt;
&lt;p&gt;So over the 5 day week that’s 100 minutes which isn’t bad and was easily absorbed. Now take a step back. That factory site had 12 production lines, now that becomes 1200 minutes, which is 20 hours. That is half a week. The reports were almost identical except filtered to a different production line, but they were all built separately and slightly different so not 100% comparable. Then you find out rolled up versions of the report were produced for every level of management.&lt;/p&gt;
&lt;p&gt;Across that production site I worked out there was roughly 0.75 of a person being used to build that report. Was that a good use of that headcount?&lt;/p&gt;
&lt;h3 id="telling-the-management-the-report-cost"&gt;Telling the management the report cost
&lt;/h3&gt;&lt;p&gt;I was the external consultant being brought in to help. It was often assumed that the problem was a lack of skills. The problem was usually a lack of communication and an assumption that management wouldn’t fix it. When I had the opportunity to ignore the internal politics and talk to the senior management, things often got fixed. Even the grumpiest manager cares about time being wasted on pointless tasks. Sometimes it takes an external consultant to point out the obvious and reduce the report costs.&lt;/p&gt;
&lt;h4 id="so-managers-please-do-the-following-"&gt;So managers please do the following :
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Look at the reports, if you don’t need them say so.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If reports need changes, please say so. People like to hear changes because it means you value their work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find your reports builders, no not their manager, find the actual builders. Ask if there is anything that could make it easier that you could initiate. Ask what their biggest challenge is, could you fix it?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Is work being repeated? Do three of your team give you the same report just filtered differently? Perhaps you could facilitate a joint effort.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="and-report-builders-please-do-the-following-"&gt;And report builders please do the following :
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Record the actual time it takes, including all the extras you forget and the problems you had last month.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Talk to your report readers and ask for feedback, let them know the challenges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If ignored, brush up your CV.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="last-word"&gt;Last Word
&lt;/h2&gt;&lt;p&gt;The stories given in this post are just a very small sample of the issues I have seen that increase report cost. The solutions to fix many of the boring problems were not complex, they just required someone to to step back, ignore company politics and look at the bigger picture.&lt;/p&gt;
&lt;p&gt;There are plenty of reporting challenges that cannot be fixed easily, that is where skilled data engineers and report builders do the magic they do. Copying and pasting data from one system to another or pressing that extract button every 3 minutes for 2 hours or manual typing in the list of 1000 exchange rates for this month is not that magic they love. Someone will offer them a better job with more chances to do data magic, and now your report cost just got much higher.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Get Previous Row Data</title><link>https://hatfullofdata.blog/power-query-get-previous-row-data/</link><pubDate>Tue, 08 Jun 2021 08:55:16 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-get-previous-row-data/</guid><description>&lt;img src="https://hatfullofdata.blog/power-query-get-previous-row-data/cover.png" alt="Featured image of post Power Query – Get Previous Row Data" /&gt;&lt;p&gt;Occasionally I get asked a question via Twitter or LinkedIn that prompts me to write a post. The question asked was how to get previous row data. In this post I will describe how to get a value from the previous row that matches a criteria. The example data is peoples scores on different dates. I want to know if they are improving. For this I need their previous score.&lt;/p&gt;
&lt;h3 id="starting-data"&gt;Starting Data
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Table of data with columns name, date and score" class="gallery-image" data-flex-basis="545px" data-flex-grow="227" height="299" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-get-previous-row-data/PreviousScore_001.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="getting-previous-row-data"&gt;Getting Previous Row Data
&lt;/h3&gt;&lt;p&gt;The first step is to sort the data. You need the previous score to be in the previous row, so we sort by name and then date.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data now sorted by Name and Date." class="gallery-image" data-flex-basis="544px" data-flex-grow="226" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-get-previous-row-data/PreviousScore_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then from the Add Column ribbon we add an Index column. And then a custom column, “Prev Index” which is Index-1&lt;/p&gt;
&lt;p&gt;&lt;img alt="Custom Column dialog showing the calculation for Prev Index of Index -1" class="gallery-image" data-flex-basis="374px" data-flex-grow="155" height="436" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-get-previous-row-data/PreviousScore_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Now we can merge a table to itself (yes a touch head screwy but its fine it works) by linking Prev Index to Index. This though will give Bob Alice’s last score as his previous score so we add the Name column to the merge as well. Holding down the Ctrl key will allow you to select multiple columns and make sure at the bottom of the dialog you have some matching rows..&lt;/p&gt;
&lt;p&gt;&lt;img alt="Merge dialog with columns selected for the merge" class="gallery-image" data-flex-basis="267px" data-flex-grow="111" height="611" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-get-previous-row-data/PreviousScore_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This creates a column that contains tables. Press the expand button and only select the Score column. Click OK to give a column of the previous scores ready to rename.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="558px" data-flex-grow="232" height="292" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-get-previous-row-data/PreviousScore_005.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I then rename Score.1 to Previous Score and use Choose Columns to remove Index and Previous Index to end up with a table of name, date, score and previous score.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Final table including previous row data" class="gallery-image" data-flex-basis="709px" data-flex-grow="295" height="230" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-get-previous-row-data/PreviousScore_006.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Dynamic Data Source and Web.Contents()</title><link>https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/</link><pubDate>Tue, 04 May 2021 13:01:31 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/</guid><description>&lt;img src="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/cover.png" alt="Featured image of post Power Query – Dynamic Data Source and Web.Contents()" /&gt;&lt;p&gt;This is the first post in a series to create a Star Wars report. This post handles the issue of using a parameter as the url in a web Power Query. This type of data source is referred to as a Dynamic Data Source. It will not refresh in the Power BI service unless you do some tricks.&lt;/p&gt;
&lt;h3 id="star-wars-series"&gt;Star Wars Series
&lt;/h3&gt;&lt;p&gt;Starting on May 4th a series using Star Wars data had to be done. Its based off an api that has some great data that is paged in 10 row blocks. I’m looking to create complete report from queries to modelling to visuals and theme etc.&lt;/p&gt;
&lt;p&gt;The data comes from &lt;a class="link" href="https://swapi.dev/api/" target="_blank" rel="noopener"
 &gt;https://swapi.dev/api/&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-contents/" target="_blank" rel="noopener"
 &gt;Handling Dynamic Data sources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Fetching number of pages&lt;/li&gt;
&lt;li&gt;Using next page url&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="fetching-data"&gt;Fetching Data
&lt;/h3&gt;&lt;p&gt;I started by looking at the people table. In a new Power BI report I select Web from Get Data and use the url &lt;a class="link" href="https://swapi.dev/api/people/" target="_blank" rel="noopener"
 &gt;https://swapi.dev/api/people/&lt;/a&gt; and click OK. This throws you straight into Power Query where is has created a few steps to get you a table of data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of 10 rows of data plus 5 query steps in Power Query" class="gallery-image" data-flex-basis="796px" data-flex-grow="331" height="205" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/API-Paged-001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;It only gives 10 rows of data, which does include the url to the next 10 rows and also how many rows there are in total. So I use a technique I’ve blogged about before and create a URL parameter, change the source step to use the URL and then convert the query into a function.&lt;/p&gt;
&lt;p&gt;Look here for more details &lt;a class="link" href="https://hatfullofdata.blog/power-query-fetch-web-data/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/power-query-fetch-web-data/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="test-refresh"&gt;Test Refresh
&lt;/h3&gt;&lt;p&gt;Then as a test I invoke the function to fetch the first 10 rows into a table, close and apply Power Query and then publish my report to the Power BI service.&lt;/p&gt;
&lt;p&gt;&lt;img alt="snapshot of the power bi workspace showing the report and dataset listed" class="gallery-image" data-flex-basis="466px" data-flex-grow="194" height="350" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/API-Paged-002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then I do the important test, does it refresh? When I click on refresh it fails, and when I click on the small red triangle it gives an error stating the dataset uses a dynamic data source and these can’t be refreshed.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen grab of the Dynamic Data Source refresh error." class="gallery-image" data-flex-basis="570px" data-flex-grow="237" height="286" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/API-Paged-003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Part of the error includes a URL &lt;a class="link" href="https://aka.ms/dynamic-data-sources" target="_blank" rel="noopener"
 &gt;https://aka.ms/dynamic-data-sources&lt;/a&gt; , so I go and look at the web page. And it explains how you can identify if you have a dynamic data source that won’t refresh by looking in the Data source settings in Power Query. Sure enough, when I look, it gives a message which I now know means a dynamic data source so refresh won’t work. I assume hand-authored queries means dynamic data sources.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data source settings dialog with message regarding hand-crafted queries which is how you identify Dynamic Data Sources exist apparently" class="gallery-image" data-flex-basis="418px" data-flex-grow="174" height="390" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/API-Paged-004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This doesn’t tell me how to to fix it though. So off onto the internet I go and search around my favourite Power Query bloggers and sure enough Chris Webb comes up trumps with a few posts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power-bi/" target="_blank" rel="noopener"
 &gt;Chris Webb’s BI Blog: Web.Contents(), M Functions And Dataset Refresh Errors In Power BI Chris Webb’s BI Blog (crossjoin.co.uk)&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/" target="_blank" rel="noopener"
 &gt;Chris Webb’s BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code Chris Webb’s BI Blog (crossjoin.co.uk)&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The second post was the one I used the most in modifying my query. It also includes searching for cow data, which I think is superb!&lt;/p&gt;
&lt;h3 id="removing-the-dynamic-data-source"&gt;Removing the Dynamic Data Source
&lt;/h3&gt;&lt;p&gt;So the Web.Contents used in the source of my function needs the base url to stay the same and then any dynamic parts put into the options. The base url must be a valid web address you can authenticate to as anonymous and the shorter the better as it makes the function more flexible. I delete the invoked function query and the function from my report.&lt;/p&gt;
&lt;p&gt;So for the Star Wars data the base url is – &lt;a class="link" href="https://swapi.dev/api" target="_blank" rel="noopener"
 &gt;https://swapi.dev/api&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The people part and the page=1 can be added in as part of the options. So the new solution has 2 parameters, TableName and PageNum and they are both text. Then we have to edit the source step by hand to write the second parameter of Web.Con (the whole hand-crafted fix to get rid of hand-crafted error is just amusing). The options are a record so put inside square brackets [ .. ]. The query is another record so is a nested [ .. ].&lt;/p&gt;
&lt;p&gt;Web.Contents options allow for two things to be set, a relative path, eg People and query parameters eg Page=1. APIs are fussy so make sure you get the case right in the query part. This is my final code for the Source step. (This is the reason I blog, so in 6 months time I know I have a working example piece of code.)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Source = Json.Document(Web.Contents(&amp;#34;https://swapi.dev/api/&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; [
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; RelativePath=TableName,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Query=[page=PageNum]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )),
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then I right click on the query and create a function. Invoking this function creates a table ready now to close and apply back into Power BI desktop. I publish and try a refresh and YES! it works. I now have a function that will take a table name and page number and give 10 rows of data.&lt;/p&gt;
&lt;p&gt;In the next post we will use this function to get all the data for a table.&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – VBA to Edit a Parameter Value</title><link>https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/</link><pubDate>Wed, 21 Apr 2021 17:04:16 +0000</pubDate><guid>https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/</guid><description>&lt;img src="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/cover.png" alt="Featured image of post Power Query – VBA to Edit a Parameter Value" /&gt;&lt;p&gt;This post is to document how to use Excel VBA to edit a parameter value without using the a cell reference in Power Query. My query was using Web.Contents which works with parameters in Excel Power Query1 but doesn’t like a function as part of the path.&lt;/p&gt;
&lt;p&gt;I started with Chris Webb’s great post on using an Excel named range and Web.Contents gave me problems. I would try Chris Webb’s method first which is found here &lt;a class="link" href="https://blog.crossjoin.co.uk/2014/07/22/working-with-excel-named-ranges-in-power-query/" target="_blank" rel="noopener"
 &gt;https://blog.crossjoin.co.uk/2014/07/22/working-with-excel-named-ranges-in-power-query/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So I want a button to take the value from a cell and update the value in a parameter. I searched the web and found one solution buried in a MrExcel forum so I’m documenting the solution here mostly so I can find it again later.&lt;/p&gt;
&lt;h3 id="vba-code-to-edit-a-parameter-value"&gt;VBA Code to Edit a Parameter Value
&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Sub ChangeParameterValue(ParameterName As String, ParameterValue As String)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Dim qry As WorkbookQuery
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Dim formula As Variant
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#39;=== Get the query
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Set qry = ThisWorkbook.Queries(ParameterName)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#39;=== Split the formula into 3 parts and update the second one
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; formula = Split(qry.formula, Chr(34), 3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; formula(1) = ParameterValue
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#39;=== Update the parameter value
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; qry.formula = Join(formula, Chr(34))
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;End Sub
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="description"&gt;Description
&lt;/h3&gt;&lt;p&gt;The formula property of a query is really weird and hard to construct so the above function splits on Chr(34), which is a “. It then updates the middle value to the new value and then sticks the three values back together again.&lt;/p&gt;
&lt;p&gt;The original forum post I got the solution from can be found at &lt;a class="link" href="https://www.mrexcel.com/board/threads/vba-code-to-edit-power-query-data-source-settings.1146964/" target="_blank" rel="noopener"
 &gt;https://www.mrexcel.com/board/threads/vba-code-to-edit-power-query-data-source-settings.1146964/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Footnotes&lt;/p&gt;
&lt;p&gt;1 – Web.Contents varies in different versions of Power Query so test carefully and do not assume you can copy and paste queries.&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Desktop Connecting to Dataverse</title><link>https://hatfullofdata.blog/power-bi-desktop-connecting-to-dataverse/</link><pubDate>Wed, 07 Apr 2021 08:46:05 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-desktop-connecting-to-dataverse/</guid><description>&lt;p&gt;Dataverse is a secure flexible data storage solution that is part of the very popular Microsoft Power Platform family. So connecting to Dataverse is an obvious request. Dataverse was previously known as Common Data Service. This post is from getting very frustrated mid-hackathon and trying to connect to Dataverse and just getting an odd error.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Dataverse logo" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="680" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-desktop-connecting-to-dataverse/Dataverse_1600x1600.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If you want to learn more about Dataverse you can find more information at &lt;a class="link" href="https://docs.microsoft.com/en-us/powerapps/maker/data-platform/?WT.mc_id=DP-MVP-5003563" target="_blank" rel="noopener"
 &gt;Microsoft Dataverse documentation&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="finding-the-environment-domain"&gt;Finding the Environment Domain
&lt;/h3&gt;&lt;p&gt;To connect to Dataverse you need the environment domain. This can be found by going to Power Apps. Then open a model driven app and look at the address bar in your browser. The domain is the XXXXX.crmX.dynamics.com part.&lt;/p&gt;
&lt;p&gt;&lt;img alt="showing the browser address bar from a model driven app." class="gallery-image" data-flex-basis="651px" data-flex-grow="271" height="250" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-desktop-connecting-to-dataverse/Power-BI-Dataverse-002.png" width="679"&gt;&lt;/p&gt;
&lt;h3 id="connecting-to-dataverse"&gt;Connecting to Dataverse
&lt;/h3&gt;&lt;p&gt;In Power BI desktop Dataverse is one of the connectors found on the Home ribbon and found in the drop down under Get Data. If you are looking in the dialog it comes under Power Platform. Here is where you put the Environment domain of your Dataverse.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Dataverse icon on the Home ribbon and the dialog box to enter in the environment domain for connecting to dataverse." class="gallery-image" data-flex-basis="361px" data-flex-grow="150" height="452" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-desktop-connecting-to-dataverse/Power-BI-Dataverse-001-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Use the domain without the https:// and without the / after it. If this is your first time connecting it will ask you to login and then will offer you the list of tables available in your Dataverse environment. I strongly advise transforming the tables to remove the columns you don’t need from your Dataverse tables.&lt;/p&gt;
&lt;p&gt;You can connect to Dataverse using DirectQuery if you must. Often its not required and makes the report slow to edit. Yes I have opinions 😊.&lt;/p&gt;
&lt;h3 id="weird-error"&gt;Weird Error
&lt;/h3&gt;&lt;p&gt;If you include the https:// or the final / or any other extras in the environment domain it will take ages to try and connect and then will come back with an error. The error refers to trying to connect to SQL server which will confuse users.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="386px" data-flex-grow="161" height="422" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-desktop-connecting-to-dataverse/Power-BI-Dataverse-004.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Paginated Report Resources</title><link>https://hatfullofdata.blog/paginated-report-resources/</link><pubDate>Sun, 21 Mar 2021 18:39:32 +0000</pubDate><guid>https://hatfullofdata.blog/paginated-report-resources/</guid><description>&lt;img src="https://hatfullofdata.blog/paginated-report-resources/cover.png" alt="Featured image of post Paginated Report Resources" /&gt;&lt;p&gt;&lt;img alt="Paginated report in design mode" class="gallery-image" data-flex-basis="752px" data-flex-grow="313" height="217" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/paginated-report-resources/Groups-and-Totals_002.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="important-update"&gt;Important Update!
&lt;/h2&gt;&lt;p&gt;On 14th Nov 2022 Microsoft announced that Paginated reports will no longer require premium capacity and can be created with a Power BI Pro license.&lt;/p&gt;
&lt;p&gt;Here is a link to the article &lt;a class="link" href="https://powerbi.microsoft.com/en-us/blog/announcing-support-for-paginated-reports-in-power-bi-pro/" target="_blank" rel="noopener"
 &gt;https://powerbi.microsoft.com/en-us/blog/announcing-support-for-paginated-reports-in-power-bi-pro/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;Here are resources to help you learn how to use Paginated reports. You will need a premium capacity or Premium per user license. If you have any extra resources or questions please reach out to me on Twitter &lt;a class="link" href="https://twitter.com/Laura_GB" target="_blank" rel="noopener"
 &gt;@Laura_GB&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id="install-report-builder"&gt;Install Report Builder
&lt;/h4&gt;&lt;p&gt;Install from the Microsoft Store if you can or download&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.microsoft.com/en-us/download/details.aspx?id=58158" target="_blank" rel="noopener"
 &gt;https://www.microsoft.com/en-us/download/details.aspx?id=58158&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="12-days-of-paginated-reports"&gt;12 Days of Paginated Reports
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/playlist?list=PLclDw3xU_tI5bypr74FnLuLGTyuTfKpV1" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/playlist?list=PLclDw3xU_tI5bypr74FnLuLGTyuTfKpV1&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="paginated-reports-in-a-day"&gt;Paginated Reports in a Day
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/power-bi/learning-catalog/paginated-reports-online-course" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/power-bi/learning-catalog/paginated-reports-online-course&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="chris-finlan-youtube"&gt;Chris Finlan YouTube
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/channel/UCLjMvjuVkfGYwChTlPLFT7A" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/channel/UCLjMvjuVkfGYwChTlPLFT7A&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="next-step-bi"&gt;Next Step BI
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://www.nextstepbi.com/" target="_blank" rel="noopener"
 &gt;https://www.nextstepbi.com/&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="paul-turleys-paginated-recipe-book"&gt;Paul Turley’s Paginated Recipe Book
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://sqlserverbi.blog/paginated-report-recipes-2020-2021/" target="_blank" rel="noopener"
 &gt;https://sqlserverbi.blog/paginated-report-recipes-2020-2021/&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="guy-in-a-cube-paginated-report-videos"&gt;Guy in a Cube Paginated Report Videos
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/c/GuyinaCube/search?query=paginated%20reports" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/c/GuyinaCube/search?query=paginated%20reports&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="greyskull-analytics-videos"&gt;Greyskull Analytics Videos
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/playlist?list=PLxEdrLBTSSr4R0OqcE8l4ETgU_0ZHDjk7" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/playlist?list=PLxEdrLBTSSr4R0OqcE8l4ETgU_0ZHDjk7&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Reactor – Last Year’s Sales</title><link>https://hatfullofdata.blog/power-bi-reactor-last-years-sales/</link><pubDate>Sun, 31 Jan 2021 22:49:25 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-reactor-last-years-sales/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/cover.png" alt="Featured image of post Power BI – Reactor – Last Year’s Sales" /&gt;&lt;p&gt;This post is to support my virtual session at London Microsoft Reactor on 1st Feb 2021. The session is an introduction to Power BI using sales data for 2020 from an imaginary gift shops.&lt;/p&gt;
&lt;h3 id="youtube-recording"&gt;YouTube Recording
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=dvTN0g-F23s" target="_blank" rel="noopener"
 &gt;&lt;img alt="recording from london reactor" class="gallery-image" data-flex-basis="466px" data-flex-grow="194" height="350" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/Feb-Sales-Report-Thumbnail.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;The Excel file used as the data can be found at:&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2021/01/Sales.xlsx" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2021/01/Sales.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The background image used in the demo can be found at:&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2021/01/Gift-Background.png" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2021/01/Gift-Background.png&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The page from SQLBI used to create the calendar table can be found at:&lt;a class="link" href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="useful-resources-mentioned-in-the-session"&gt;Useful Resources Mentioned in the Session
&lt;/h3&gt;&lt;p&gt;Create a calendar in Power Query by Radacad.&lt;a class="link" href="https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns" target="_blank" rel="noopener"
 &gt;https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Guy in a Cube&lt;a class="link" href="https://www.youtube.com/channel/UCFp1vaKzpfvoGai0vE5VJ0w" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/channel/UCFp1vaKzpfvoGai0vE5VJ0w&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Chris Hamill’s Backgrounds&lt;a class="link" href="https://alluringbi.com/2020/05/05/themeable-backgrounds-for-power-bi/" target="_blank" rel="noopener"
 &gt;https://alluringbi.com/2020/05/05/themeable-backgrounds-for-power-bi/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="next-session"&gt;Next Session
&lt;/h3&gt;&lt;p&gt;The next session will be 22nd Feb 2021, when we will look at UK population data. Closer to the date you’ll be able to find joining instructions at &lt;a class="link" href="https://www.meetup.com/Microsoft-Reactor-London/" target="_blank" rel="noopener"
 &gt;https://www.meetup.com/Microsoft-Reactor-London/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="london-reactor-posts"&gt;London Reactor Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-power-bi-introduction-resources/" target="_blank" rel="noopener"
 &gt;Power BI Introduction&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-introduction-weather-report-resources/" target="_blank" rel="noopener"
 &gt;Weather Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/" target="_blank" rel="noopener"
 &gt;Use AI Visuals to Analyse Titanic Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/" target="_blank" rel="noopener"
 &gt;Christmas Carol Text Analysis&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/" target="_blank" rel="noopener"
 &gt;Last Year’s Sales&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/" target="_blank" rel="noopener"
 &gt;Tea &amp;amp; Biscuits&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – AI Insights Error</title><link>https://hatfullofdata.blog/power-query-ai-insights-error/</link><pubDate>Fri, 15 Jan 2021 22:09:52 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-ai-insights-error/</guid><description>&lt;img src="https://hatfullofdata.blog/power-query-ai-insights-error/cover.png" alt="Featured image of post Power Query – AI Insights Error" /&gt;&lt;p&gt;AI Insights in Power Query is a great Premium feature in Power BI. An AI Insights Error can occur if you are not fully aware of the settings you need to check. This foxed me for 2+ hours today. So I hope this post helps someone not waste the 2 hours like me.&lt;/p&gt;
&lt;p&gt;From the Add Columns ribbon I selected Text Analytics and then in the Text Analytics I selected Extract key phrases, but this is true for any of the AI functions.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Selecting Text Analytics" class="gallery-image" data-flex-basis="458px" data-flex-grow="191" height="356" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-ai-insights-error/Error_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;It thought for a while, and I assumed it was processing. And then it gave this error. I tried every combination of what I could do to get rid of the error.&lt;/p&gt;
&lt;p&gt;&lt;img alt="AI Insights Error in Power Query that states\nWe cannot convert the value Function to type Function." class="gallery-image" data-flex-basis="1157px" data-flex-grow="482" height="141" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-ai-insights-error/Error_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The issue is when you do an AI function it creates a data source with a Public privacy level. So if your data that you are analysing has a different privacy level you get the error above.&lt;/p&gt;
&lt;h3 id="fixing-privacy-levels"&gt;Fixing Privacy Levels
&lt;/h3&gt;&lt;p&gt;This issue has a really quick fix once you realise what it is caused by. On the home ribbon in Power Query, click on Data source setting. This opens the Data Source setting dialog box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data source setting dialog" class="gallery-image" data-flex-basis="435px" data-flex-grow="181" height="375" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-ai-insights-error/Error_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click on each data source and click on Edit Permissions. Change the privacy level to be the same, I use Organizational usually.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Edit Permissions dialog" class="gallery-image" data-flex-basis="299px" data-flex-grow="124" height="545" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-ai-insights-error/Error_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you have checked all your data sources you can click close in the Data Source Settings dialog and refresh your data to get rid of the error.&lt;/p&gt;
&lt;h3 id="conclusion-on-ai-insights-errors"&gt;Conclusion on AI Insights Errors
&lt;/h3&gt;&lt;p&gt;This is a classic case of when you know the cause it’s easy to fix. I hope it helped.&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Top 10 Posts and Videos in 2020</title><link>https://hatfullofdata.blog/top-10-in-2020/</link><pubDate>Thu, 31 Dec 2020 16:45:51 +0000</pubDate><guid>https://hatfullofdata.blog/top-10-in-2020/</guid><description>&lt;p&gt;Throughout 2020 I have posted blog posts and videos covering mostly Power BI topics with some Power Apps and Power Automate posts. For me its made me learn topics properly and given me a buzz watching numbers rise.&lt;/p&gt;
&lt;p&gt;Various people have promoted blogs and videos and I cannot thank them enough. I’m am looking forward to being able to travel and thank them in person. Also a huge thanks to everyone who subscribed, retweeted a tweet, liked a tweet and viewed or read my content.&lt;/p&gt;
&lt;p&gt;Looking forward to 2021, creating new content and collaborating with the amazing tech community across the world.&lt;/p&gt;
&lt;h2 id="my-2020-in-content-views"&gt;My 2020 in Content Views
&lt;/h2&gt;&lt;iframe title="Stats Report" width="600" height="373.5" src="https://app.powerbi.com/view?r=eyJrIjoiMDlkOWRkZWEtYzJlZS00NmFkLWFhYjUtNjAxY2M4ZjQ0YjhmIiwidCI6ImJlMWNhYzEzLTY1NzUtNGY4ZS1hNDBkLWZjYzJkODlkYTY0ZiIsImMiOjh9" frameborder="0" allowFullScreen="true"&gt;&lt;/iframe&gt;
&lt;p&gt;For those who are curious the report above is based off data downloaded from YouTube analytics and Google analytics. No live connects, I’m on holiday 🙂&lt;/p&gt;</description></item><item><title>Power BI – Reactor – Christmas Carol Text analysis</title><link>https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/</link><pubDate>Mon, 14 Dec 2020 14:58:39 +0000</pubDate><guid>https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/</guid><description>&lt;img src="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/cover.jpg" alt="Featured image of post Power BI – Reactor – Christmas Carol Text analysis" /&gt;&lt;p&gt;This post is to support my session at London Microsoft Reactor. The session series have all been introduction to Power BI. This session uses some Christmas Carol song lyrics and then using some AI premium tools to analyse the text.&lt;/p&gt;
&lt;h3 id="youtube-recording"&gt;YouTube Recording
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=DvJk--JhzhI" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="401px" data-flex-grow="167" height="406" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/reactor-session-1.jpg" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;The Excel file used as the data can be found at&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/12/Christmas-Carols.xlsx" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/12/Christmas-Carols.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The background image and theme file can be found at&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/12/Christmas-Carol-Background.png" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/12/Christmas-Carol-Background.png&lt;/a&gt;&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/12/Christmas-Carol-Theme.zip" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/12/Christmas-Carol-Theme.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Theme file is zipped for security reasons (WordPress had its reasons apparently).&lt;/p&gt;
&lt;h2 id="london-reactor-posts"&gt;London Reactor Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-power-bi-introduction-resources/" target="_blank" rel="noopener"
 &gt;Power BI Introduction&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-introduction-weather-report-resources/" target="_blank" rel="noopener"
 &gt;Weather Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/" target="_blank" rel="noopener"
 &gt;Use AI Visuals to Analyse Titanic Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/" target="_blank" rel="noopener"
 &gt;Christmas Carol Text Analysis&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/" target="_blank" rel="noopener"
 &gt;Last Year’s Sales&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/" target="_blank" rel="noopener"
 &gt;Tea &amp;amp; Biscuits&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Dataflow – Create Dataflow from Export</title><link>https://hatfullofdata.blog/power-bi-create-dataflow-from-export/</link><pubDate>Sat, 28 Nov 2020 23:15:04 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-create-dataflow-from-export/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/cover.png" alt="Featured image of post Power BI Dataflow – Create Dataflow from Export" /&gt;&lt;p&gt;There are times when you need to copy a dataflow from one workspace to another workspace. Power BI service provides a simple way to export the definition as a json file and then import.&lt;/p&gt;
&lt;h3 id="dataflow-series"&gt;Dataflow Series
&lt;/h3&gt;&lt;p&gt;This post is part of a series on dataflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Create a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/" target="_blank" rel="noopener"
 &gt;Set up Dataflow Refresh&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflows-endorsement-as-promoted-and-certified/" target="_blank" rel="noopener"
 &gt;Endorsement&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/" target="_blank" rel="noopener"
 &gt;Diagram View&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/" target="_blank" rel="noopener"
 &gt;Refresh History&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/" target="_blank" rel="noopener"
 &gt;Create Dataflow from Export JSON File&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Incremental Refresh&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=mteeKPNGIdM" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/Dataflow-Import-00.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="export-dataflow-as-json-file"&gt;Export dataflow as json file
&lt;/h3&gt;&lt;p&gt;&lt;img alt="select export json" class="gallery-image" data-flex-basis="384px" data-flex-grow="160" height="424" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/export_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the workspace of the original workspace, click on the three dots next to the dataflow and select Export json. When the file is ready a message will appear in the top right.&lt;/p&gt;
&lt;p&gt;&lt;img alt="message to say export file is ready" class="gallery-image" data-flex-basis="560px" data-flex-grow="233" height="291" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/export_002.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="create-dataflow-from-json-file"&gt;Create dataflow from json file
&lt;/h3&gt;&lt;p&gt;&lt;img alt="New Dataflow Import Model" class="gallery-image" data-flex-basis="277px" data-flex-grow="115" height="588" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/export_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the destination workspace click on the New dropdown and select dataflow. From the options then displayed select Import Model. Select a your json file. Once the json file has imported a message will appear in the top right.&lt;/p&gt;
&lt;p&gt;&lt;img alt="import successful" class="gallery-image" data-flex-basis="519px" data-flex-grow="216" height="314" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/export_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Although your dataflow has been created you are left on the dataflow creation page. You need to return to the workspace to see your new dataflow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="new dataflow from export" class="gallery-image" data-flex-basis="251px" data-flex-grow="104" height="649" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/export_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="check-credentials"&gt;Check Credentials
&lt;/h3&gt;&lt;p&gt;The dataflow will not have refreshes setup as that is not part of the model. It is also recommended that you confirm that the credentials are correctly loaded. If you the dataflow is from another user or another tenancy you will need to re-login each credential.&lt;/p&gt;
&lt;p&gt;&lt;img alt="check credentials" class="gallery-image" data-flex-basis="271px" data-flex-grow="113" height="601" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/export_006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;To check the credentials you need to click on the three dots next to your new dataflow and select Settings. In settings, expand Data source credentials. If any of the credentials have a cross next to them click on Edit credentials to re-login.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Part of my work is to build dataflows to assist people fathom the depths of Microsoft Project data. The ability to export a dataflow means I have been able to transfer a solution between different teams across the company.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Dataflow – Refresh History</title><link>https://hatfullofdata.blog/power-bi-dataflow-refresh-history/</link><pubDate>Mon, 23 Nov 2020 16:20:50 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-dataflow-refresh-history/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/cover.png" alt="Featured image of post Power BI Dataflow – Refresh History" /&gt;&lt;p&gt;You can find out which entity took the longest to refresh or which entity caused the error in a failed refresh by looking at the refresh history of your dataflow in the Power BI workspace.&lt;/p&gt;
&lt;h3 id="dataflow-series"&gt;Dataflow Series
&lt;/h3&gt;&lt;p&gt;This post is part of a series on dataflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Create a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/" target="_blank" rel="noopener"
 &gt;Set up Dataflow Refresh&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflows-endorsement-as-promoted-and-certified/" target="_blank" rel="noopener"
 &gt;Endorsement&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/" target="_blank" rel="noopener"
 &gt;Diagram View&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/" target="_blank" rel="noopener"
 &gt;Refresh History&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/" target="_blank" rel="noopener"
 &gt;Create Dataflow from Export JSON File&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Incremental Refresh&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/TpHiXJjSzEc" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube link" class="gallery-image" data-flex-basis="427px" data-flex-grow="178" height="382" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/Dataflow-Refresh-History-Thumbnail.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="refresh-history-list"&gt;Refresh History List
&lt;/h3&gt;&lt;p&gt;In the workspace, click on the three dots next to the dataflow and from the menu select Refresh History. This will open a dialog that has a row for every refresh.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Open Refresh History" class="gallery-image" data-flex-basis="384px" data-flex-grow="160" height="425" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/history_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Refresh history dialog" class="gallery-image" data-flex-basis="458px" data-flex-grow="191" height="356" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/history_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Every refresh will show when it happened, how long it took and if it completed or failed. In the above image we can see the last 2 refreshes failed but the 4 previous refreshes completed.&lt;/p&gt;
&lt;h3 id="refresh-history-files"&gt;Refresh History Files
&lt;/h3&gt;&lt;p&gt;The details of the refresh for each entity that loads from the dataflow can be found by downloading the csv file. You can download the csv file for a refresh by clicking on the down arrow on the right of each refresh row.&lt;/p&gt;
&lt;p&gt;&lt;img alt="click on arrow to download file" class="gallery-image" data-flex-basis="533px" data-flex-grow="222" height="306" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/history_004.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="calculating-the-refresh-time"&gt;Calculating the Refresh Time
&lt;/h3&gt;&lt;p&gt;Excel will happily open the CSV file. The first column might say Invalid Date this is due to the Power BI service trying to treat a dd/mm/yyyy formatted date as mm/dd/yyyy. I have reported the issue to Microsoft.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Excel with the csv file" class="gallery-image" data-flex-basis="788px" data-flex-grow="328" height="207" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/history_005.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;A simple calculation of (End Time – Start Time) will give you the duration in days so in this example I then multiplied it 24&lt;em&gt;60&lt;/em&gt;60 to give seconds. Adjust the calculation to minutes or hours to fit your durations.&lt;/p&gt;
&lt;h3 id="showing-errors"&gt;Showing Errors
&lt;/h3&gt;&lt;p&gt;If you download the file of a failed refresh you will either get a single line why the whole refresh failed or details of which entity failed. there are occasions when the error is not clear, for example the second one shown.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="647px" data-flex-grow="269" height="252" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/history_006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the first example the sales entity has failed due to a problem with the “Qty” column. This causes the other entities’ refreshes to be cancelled.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;The Refresh History is an important part of understanding how a dataflow is performing. Hopefully at some point there will be an API to fetch the history directly, last time I looked there wasn’t.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Dataflow – New Diagram View</title><link>https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/</link><pubDate>Sat, 21 Nov 2020 22:32:08 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/cover.png" alt="Featured image of post Power BI Dataflow – New Diagram View" /&gt;&lt;p&gt;In November 2020 a new diagram view was introduced to the online Power Query editor. The new feature produces a brilliant diagram of how the queries and parameters relate within the dataflow.&lt;/p&gt;
&lt;h3 id="dataflow-series"&gt;Dataflow Series
&lt;/h3&gt;&lt;p&gt;This post is part of a series on dataflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Create a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/" target="_blank" rel="noopener"
 &gt;Set up Dataflow Refresh&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflows-endorsement-as-promoted-and-certified/" target="_blank" rel="noopener"
 &gt;Endorsement&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/" target="_blank" rel="noopener"
 &gt;Diagram View&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/" target="_blank" rel="noopener"
 &gt;Refresh History&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/" target="_blank" rel="noopener"
 &gt;Create Dataflow from Export JSON File&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Incremental Refresh&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=UtjWv8Y3dqc" target="_blank" rel="noopener"
 &gt;&lt;img alt="Link to YouTube" class="gallery-image" data-flex-basis="428px" data-flex-grow="178" height="381" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/data-flow-diagram-00.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="displaying-diagram-view"&gt;Displaying Diagram View
&lt;/h3&gt;&lt;p&gt;&lt;img alt="View ribbon" class="gallery-image" data-flex-basis="703px" data-flex-grow="293" height="232" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When editing your dataflow, click on the View ribbon tab and select Diagram View. The diagram view will appear between the ribbon and the formula bar.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Diagram view displayed" class="gallery-image" data-flex-basis="395px" data-flex-grow="164" height="413" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_002.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="object-types-shown-in-diagram-view"&gt;Object Types Shown in Diagram View
&lt;/h3&gt;&lt;p&gt;The entities with a blue border are loaded entities, i.e. listed when connecting and the entities with a grey border are not loaded, so they refresh but are not exposed to the report builder. Parameters and functions have a relevant symbols in the top left and a grey border.&lt;/p&gt;
&lt;p&gt;&lt;img alt="boxes in diagram" class="gallery-image" data-flex-basis="244px" data-flex-grow="101" height="601" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_003-1.png" width="613"&gt;&lt;/p&gt;
&lt;h3 id="query-steps-preview"&gt;Query Steps Preview
&lt;/h3&gt;&lt;p&gt;If you hover your mouse pointer over the step counter, it will display a list of the query steps.&lt;/p&gt;
&lt;p&gt;&lt;img alt="step preview in diagram view" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="509" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_004.png" width="637"&gt;&lt;/p&gt;
&lt;h3 id="expanding-display-view-boxes"&gt;Expanding Display View boxes
&lt;/h3&gt;&lt;p&gt;In the top right corner of each query and function box there is a double-headed arrow button. Click this button to expand the query and show all the steps. The button is a toggle to switch between collapsed and expanded views.&lt;/p&gt;
&lt;p&gt;&lt;img alt="expand display view boxes using toggle" class="gallery-image" data-flex-basis="688px" data-flex-grow="286" height="237" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_005.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If multiple queries are expanded, you can collapse all query boxes by using the toolbar in the bottom right of the canvas. It has collapse all and expand all buttons.&lt;/p&gt;
&lt;p&gt;&lt;img alt="canvas buttons" class="gallery-image" data-flex-basis="1419px" data-flex-grow="591" height="115" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_005a.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="displaying-step-names"&gt;Displaying Step Names
&lt;/h3&gt;&lt;p&gt;By default an expanded query displays step labels, i.e. the name of the action being applied. You can display the names of the steps by clicking on arrow below Diagram view button and selecting Show step names.&lt;/p&gt;
&lt;p&gt;&lt;img alt="displaying step names" class="gallery-image" data-flex-basis="542px" data-flex-grow="225" height="301" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_007.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="related-queries"&gt;Related Queries
&lt;/h3&gt;&lt;p&gt;Related queries can be highlighted using the model diagram button in the top right of the query box. It will highlight all related objects blue or grey based on their borders. In a complex dataflow this can be useful to understand the complexities.&lt;/p&gt;
&lt;p&gt;&lt;img alt="highlighting related queries." class="gallery-image" data-flex-basis="355px" data-flex-grow="148" height="459" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_006.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-steps"&gt;Adding Steps
&lt;/h3&gt;&lt;p&gt;When a query is selected and expanded it displays a plus sign. Clicking on the plus button displays a list of possible steps to add, it will be based on the column you have selected. There is a search box to assist in finding the right step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding steps" class="gallery-image" data-flex-basis="547px" data-flex-grow="228" height="298" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/Diagram_009.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Clicking on the three dots in the top right hand corner offer multiple query steps to add to the query plus some other options.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Diagram view is a great addition to the online dataflow editor. Diagrams are a great way to explain a structure and this should help explain transforms within a dataflow. Personally I doubt I will be using the plus button to add steps, but then I am not the target audience.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI Dataflows – Endorsement as Promoted and Certified</title><link>https://hatfullofdata.blog/power-bi-dataflows-endorsement/</link><pubDate>Sat, 21 Nov 2020 20:55:18 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-dataflows-endorsement/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-dataflows-endorsement/cover.png" alt="Featured image of post Power BI Dataflows – Endorsement as Promoted and Certified" /&gt;&lt;p&gt;Inform your users as to which dataflow to use by using Endorsement. This allows you to label a dataflow as promoted or certified.&lt;/p&gt;
&lt;h3 id="dataflow-series"&gt;Dataflow Series
&lt;/h3&gt;&lt;p&gt;This post is part of a series on dataflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Create a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/" target="_blank" rel="noopener"
 &gt;Set up Dataflow Refresh&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflows-endorsement-as-promoted-and-certified/" target="_blank" rel="noopener"
 &gt;Endorsement&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/" target="_blank" rel="noopener"
 &gt;Diagram View&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/" target="_blank" rel="noopener"
 &gt;Refresh History&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/" target="_blank" rel="noopener"
 &gt;Create Dataflow from Export JSON File&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Incremental Refresh&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/ZhyE2cNDdlg" target="_blank" rel="noopener"
 &gt;&lt;img alt="link to video on YouTube" class="gallery-image" data-flex-basis="428px" data-flex-grow="178" height="381" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflows-endorsement/Dataflow-Endorse-Thumbnail.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="before-endorsement"&gt;Before Endorsement
&lt;/h3&gt;&lt;p&gt;When a report builder selects dataflow as the data source, the list of dataflows only shows the title of the dataflows. It gives no indication of the last refresh date or owner so if there are similar names your report builders could easily pick the incorrect dataflow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Connecting before endorsement." class="gallery-image" data-flex-basis="313px" data-flex-grow="130" height="521" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflows-endorsement/Endorse_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the above example there is Biscuits and Biscuit Data and no information to help a report builder decide which dataflow is the correct one.&lt;/p&gt;
&lt;h3 id="adding-endorsement"&gt;Adding Endorsement
&lt;/h3&gt;&lt;p&gt;Endorsement has to happen in workspace. Click on the three dots next to the dataflow and select Settings. In settings, expand the Endorsement section to see three options.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;None – default setting with no endorsement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Promoted – this level can be added by the dataflow owner.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Certified – this level can only be added by owners who have been given permission by the tenancy admins. Details of how an admin can add be found in &lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a dataset post&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="selecting level of Endorsement" class="gallery-image" data-flex-basis="658px" data-flex-grow="274" height="248" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflows-endorsement/Endorse_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you have selected the level, click Apply to save it.&lt;/p&gt;
&lt;h3 id="after-endorsement"&gt;After Endorsement
&lt;/h3&gt;&lt;p&gt;Now when a user selects dataflow as their connector they will see the same list of dataflows but they will be tagged as Promoted or Certified.&lt;/p&gt;
&lt;p&gt;&lt;img alt="dataflows with endorsement tags" class="gallery-image" data-flex-basis="197px" data-flex-grow="82" height="825" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dataflows-endorsement/Endorse_003.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;When someone has done the hard work to create a dataflow to assist the users in building reports it is important to let your users know which dataflow is the one to use.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – London Reactor – Tea &amp; Biscuits Session</title><link>https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/</link><pubDate>Sun, 15 Nov 2020 23:07:36 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/cover.png" alt="Featured image of post Power BI – London Reactor – Tea &amp; Biscuits Session" /&gt;&lt;p&gt;This post is to support my virtual introduction to Power BI session for London Reactor on 16th November 2020.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;Tea Production – &lt;a class="link" href="https://teahow.com/where-is-tea-grown/" target="_blank" rel="noopener"
 &gt;https://teahow.com/where-is-tea-grown/&lt;/a&gt;Favourite Biscuit – &lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/11/Biscuit-Data.xlsx" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/11/Biscuit-Data.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The biscuit data is fictitious using randomly generated names and random selection of biscuits.&lt;/p&gt;
&lt;h3 id="session-recording"&gt;Session Recording
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/nQESavfh5qI" target="_blank" rel="noopener"
 &gt;&lt;img alt="Link to video" class="gallery-image" data-flex-basis="462px" data-flex-grow="192" height="353" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/Tea-and-Biscuits.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="london-reactor-posts"&gt;London Reactor Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-power-bi-introduction-resources/" target="_blank" rel="noopener"
 &gt;Power BI Introduction&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-introduction-weather-report-resources/" target="_blank" rel="noopener"
 &gt;Weather Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/" target="_blank" rel="noopener"
 &gt;Use AI Visuals to Analyse Titanic Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/" target="_blank" rel="noopener"
 &gt;Christmas Carol Text Analysis&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/" target="_blank" rel="noopener"
 &gt;Last Year’s Sales&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/" target="_blank" rel="noopener"
 &gt;Tea &amp;amp; Biscuits&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Scheduled Refresh for your Dataflow</title><link>https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/</link><pubDate>Mon, 09 Nov 2020 17:45:23 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/cover.png" alt="Featured image of post Power BI – Scheduled Refresh for your Dataflow" /&gt;&lt;p&gt;Most dataflows needs to have scheduled refresh setup so that the data will be up to date ready for the reports connecting to it. This post walks through the basic steps to set up the refresh.&lt;/p&gt;
&lt;h3 id="dataflow-series"&gt;Dataflow Series
&lt;/h3&gt;&lt;p&gt;This post is part of a series on dataflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Create a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/" target="_blank" rel="noopener"
 &gt;Set up Dataflow Refresh&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflows-endorsement-as-promoted-and-certified/" target="_blank" rel="noopener"
 &gt;Endorsement&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/" target="_blank" rel="noopener"
 &gt;Diagram View&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/" target="_blank" rel="noopener"
 &gt;Refresh History&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/" target="_blank" rel="noopener"
 &gt;Create Dataflow from Export JSON File&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Incremental Refresh&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=gYAbY-MAJ28" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube thumbnail with link to video" class="gallery-image" data-flex-basis="414px" data-flex-grow="172" height="394" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/Refresh_001.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="setup-scheduled-refresh"&gt;Setup Scheduled Refresh
&lt;/h3&gt;&lt;p&gt;In the workspace containing the dataflow, there is no Next Refresh on the dataflow. Therefore the dataflow will not refresh automatically.&lt;/p&gt;
&lt;p&gt;&lt;img alt="dataflow without scheduled refresh" class="gallery-image" data-flex-basis="1682px" data-flex-grow="701" height="97" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/Refresh_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click on the three dots on the dataflow row, they appear when your mouse hovers over the row. Select Settings from the options.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Go to settings" class="gallery-image" data-flex-basis="383px" data-flex-grow="159" height="426" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/Refresh_003.png" width="680"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Expand Scheduled refresh.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on the toggle to turn on scheduled refresh.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select refresh frequency, daily means every day, weekly means you can select which day of the week.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select your time zone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you have selected weekly, select days.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Add another time and enter the hour, minutes and am or pm for every time you want the refresh to happen.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Leave the tick so you you will be notified if the dataflow refresh fails.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click Apply.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="details of setting up scheduled refresh" class="gallery-image" data-flex-basis="211px" data-flex-grow="88" height="772" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/Refresh_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once the above has been completed, we can now return to the workspace. The dataflow now has a Next Refresh date and time for next Wednesday at 8:30am.&lt;/p&gt;
&lt;p&gt;&lt;img alt="dataflow in workspace with refresh setup" class="gallery-image" data-flex-basis="1773px" data-flex-grow="739" height="92" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/Refresh_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;It always fascinates me how people are not confident in setting up the refreshes of datasets and dataflows. Hopefully this quick simple guide will give enough confidence to setup the refreshes to happen without people logging into Power BI to refresh the dataset or dataflow manually.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Create a Dataflow for Reusable Transforms</title><link>https://hatfullofdata.blog/power-bi-create-a-dataflow/</link><pubDate>Tue, 03 Nov 2020 14:18:01 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-create-a-dataflow/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-create-a-dataflow/cover.png" alt="Featured image of post Power BI – Create a Dataflow for Reusable Transforms" /&gt;&lt;p&gt;This post is a quick guide to create a dataflow and connect to a dataflow. Dataflows are a great way to give your report writers reusable data source that includes any complex transformations required and doesn’t require unique data logins for every report writer. It just requires access to the workspace that contains your dataflow.&lt;/p&gt;
&lt;h3 id="dataflow-series"&gt;Dataflow Series
&lt;/h3&gt;&lt;p&gt;This post is part of a series on dataflows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Create a Dataflow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-scheduled-refresh-dataflow/" target="_blank" rel="noopener"
 &gt;Set up Dataflow Refresh&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflows-endorsement-as-promoted-and-certified/" target="_blank" rel="noopener"
 &gt;Endorsement&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-new-diagram-view/" target="_blank" rel="noopener"
 &gt;Diagram View&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataflow-refresh-history/" target="_blank" rel="noopener"
 &gt;Refresh History&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-dataflow-from-export/" target="_blank" rel="noopener"
 &gt;Create Dataflow from Export JSON File&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Incremental Refresh&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=er-I-U8Ey8g" target="_blank" rel="noopener"
 &gt;&lt;img alt="youtube video" class="gallery-image" data-flex-basis="409px" data-flex-grow="170" height="399" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_001.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="create-a-dataflow"&gt;Create a Dataflow
&lt;/h3&gt;&lt;p&gt;Staring in the workspace online in the Power BI service, click on New and then select Dataflow.&lt;/p&gt;
&lt;p&gt;In the next screen click on Add new entities button to start creating your dataflow.&lt;/p&gt;
&lt;p&gt;&lt;img alt="New dataflow menu and Add new entities" class="gallery-image" data-flex-basis="269px" data-flex-grow="112" height="606" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_002-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next screen lists all the data sources supported for dataflows. Select your data source. There is a search box in the top right if required. In this example I selected SQL Server database, although I could have picked Azure SQL Server.&lt;/p&gt;
&lt;p&gt;As soon as you click in the data source, you will be prompted to enter in connection settings. When complete click Next to continue.&lt;/p&gt;
&lt;p&gt;&lt;img alt="connection strings" class="gallery-image" data-flex-basis="339px" data-flex-grow="141" height="481" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You will then be prompted to select the tables or views to add to the dataflow. You can see previews if that helps. When ready select Transform data button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="select tables" class="gallery-image" data-flex-basis="436px" data-flex-grow="181" height="374" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This will open an online version of Power Query. Add the transforms you need to each query. When you have finished click Save &amp;amp; close to finish creating your dataflow.&lt;/p&gt;
&lt;p&gt;It will then prompt you for a name for your dataflow and an optional description.&lt;/p&gt;
&lt;p&gt;&lt;img alt="name the dataflow" class="gallery-image" data-flex-basis="256px" data-flex-grow="106" height="636" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="refresh-the-dataflow"&gt;Refresh the Dataflow
&lt;/h3&gt;&lt;p&gt;Although you saw data in the dataflow as you were building it, its not there until you refresh. You get a message for a short while when you save it asking if you want to refresh in the top right hand corner. If you miss that you can return to the workspace and when you hover your mouse point over the dataflow the refresh icon appears.&lt;/p&gt;
&lt;p&gt;&lt;img alt="refresh dataflow" class="gallery-image" data-flex-basis="516px" data-flex-grow="215" height="316" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_006.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="connect-to-a-dataflow"&gt;Connect to a Dataflow
&lt;/h3&gt;&lt;p&gt;A report, in Power BI desktop, can connect to the dataflow as a data source. Click on Get Data to open the dialog, click Power Platform to filter the options and then select Power BI dataflows. Click Connect to start the connection to dataflows.&lt;/p&gt;
&lt;p&gt;&lt;img alt="get data dialog" class="gallery-image" data-flex-basis="318px" data-flex-grow="132" height="512" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the Navigator dialog appears, expand the correct workspace and dataflow to select the tables. Click Load to load the data into your report. You can click transform to add extra transformations into your data if required.&lt;/p&gt;
&lt;p&gt;&lt;img alt="select entities" class="gallery-image" data-flex-basis="249px" data-flex-grow="104" height="653" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-create-a-dataflow/Create_008.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="note-on-refreshes"&gt;Note on Refreshes
&lt;/h3&gt;&lt;p&gt;If a report is based on a dataflow, the dataflow needs to refresh before the report refreshes. Care needs to be taken on setting refreshes to co-ordinate correctly.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Dataflows are a great part of the data reporting structure that can reduce the hit on databases, reduce the number of accounts accessing the data and give the report writers clean well structured data to build their reports on.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Reactor – Use AI Visuals to Analyse Titanic Data</title><link>https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/</link><pubDate>Mon, 12 Oct 2020 14:50:28 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/cover.png" alt="Featured image of post Power BI – Reactor – Use AI Visuals to Analyse Titanic Data" /&gt;&lt;p&gt;This is a post to support my session at the Reactor on 12th October 2020. The session was aimed at newcomers to Power BI and the AI visuals. Below is a link to the video on Reactor’s YouTube channel&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=EJ7b2F7fQY8" target="_blank" rel="noopener"
 &gt;&lt;img alt="link to you tube" class="gallery-image" data-flex-basis="461px" data-flex-grow="192" height="354" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/Reactor-AI-Titanic.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="data-sources"&gt;Data Sources
&lt;/h3&gt;&lt;p&gt;The session uses 2 data sources, the passenger list for the Titanic and an Excel file to add some extra information such as port locations.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/10/TitanicLocations.xlsx" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/10/TitanicLocations.xlsx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/10/titanicdata.csv" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/10/titanicdata.csv&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="transformations"&gt;Transformations
&lt;/h3&gt;&lt;p&gt;The passenger list data requires some transformations to make it easier to work with. The two main skills demo’d are Column by Example and Selecting columns. These are covered in these 2 videos.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=6UoKsUypYQw" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="397px" data-flex-grow="165" height="302" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/Oct2020_002.png" width="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=Jg1tmbE-abM" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="398px" data-flex-grow="166" height="301" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/Oct2020_001.png" width="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="page-background"&gt;Page Background
&lt;/h3&gt;&lt;p&gt;In order to make page layout easy I use page backgrounds created in PowerPoint. This idea I got from Chris Hammill’s brilliant blog post found at &lt;a class="link" href="https://alluringbi.com/2019/10/21/background-concepts-for-power-bi/" target="_blank" rel="noopener"
 &gt;https://alluringbi.com/2019/10/21/background-concepts-for-power-bi/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="ai-visuals"&gt;AI Visuals
&lt;/h3&gt;&lt;p&gt;In this demo I use 3 AI visuals Key Influencers, Decomposition Tree and Smart Narrative. Here are videos to help you get started with those visuals.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=hF8dHUEmtnY" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="400px" data-flex-grow="166" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/Oct2020_003.png" width="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=WES4CLKSaj0" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="401px" data-flex-grow="167" height="299" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/Oct2020_004.png" width="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=7d2qMoTPCIM" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="424px" data-flex-grow="176" height="283" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/Oct2020_005.png" width="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="london-reactor-posts"&gt;London Reactor Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-power-bi-introduction-resources/" target="_blank" rel="noopener"
 &gt;Power BI Introduction&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-introduction-weather-report-resources/" target="_blank" rel="noopener"
 &gt;Weather Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/" target="_blank" rel="noopener"
 &gt;Use AI Visuals to Analyse Titanic Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/" target="_blank" rel="noopener"
 &gt;Christmas Carol Text Analysis&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/" target="_blank" rel="noopener"
 &gt;Last Year’s Sales&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/" target="_blank" rel="noopener"
 &gt;Tea &amp;amp; Biscuits&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Reactor – Weather Report Resources</title><link>https://hatfullofdata.blog/power-bi-reactor-weather-report-resources/</link><pubDate>Wed, 02 Sep 2020 21:43:14 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-reactor-weather-report-resources/</guid><description>&lt;p&gt;Thank you everyone who attended my virtual session at the London Reactor on Wednesday. Here are links to resources I used for the presentation.&lt;/p&gt;
&lt;h3 id="weather-data"&gt;Weather Data
&lt;/h3&gt;&lt;p&gt;The met office very usefully provides data in a text format for stations across the UK. The first link is to the summary page that gives a map link to all the stations. The second link is to Whitby’s station data.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.metoffice.gov.uk/research/climate/maps-and-data/historic-station-data" target="_blank" rel="noopener"
 &gt;https://www.metoffice.gov.uk/research/climate/maps-and-data/historic-station-data&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.metoffice.gov.uk/pub/data/weather/uk/climate/stationdata/whitbydata.txt" target="_blank" rel="noopener"
 &gt;https://www.metoffice.gov.uk/pub/data/weather/uk/climate/stationdata/whitbydata.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have typed up the list of station with Latitude and Longitude values into an Excel file which can be &lt;a class="link" href="https://lgb123-my.sharepoint.com/:x:/g/personal/laura_graham-brown_co_uk/EUfCNeKf1sBGq7GjKWT6sEsBdTCqRMwhYym8QTeVs6L86w" target="_blank" rel="noopener"
 &gt;accessed here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="background"&gt;Background
&lt;/h3&gt;&lt;p&gt;Chris Hamill has written a great post on designing backgrounds for reports that make a report load quicker and make it easier to read.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://alluringbi.com/2019/10/21/background-concepts-for-power-bi/" target="_blank" rel="noopener"
 &gt;https://alluringbi.com/2019/10/21/background-concepts-for-power-bi/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="calendar"&gt;Calendar
&lt;/h3&gt;&lt;p&gt;SQL BI team have a huge range of videos and blog posts on many DAX topics. The example we used in this session was creating a simple calendar using code from this page..&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="turn-off-time-intelligence"&gt;Turn Off Time Intelligence.
&lt;/h3&gt;&lt;p&gt;Another great source of educational material on Power BI is is Guy in a Cube. One recent video explains the reason to turn off the Time Intelligence.&lt;/p&gt;
&lt;h3 id="drill-through-button"&gt;Drill Through Button
&lt;/h3&gt;&lt;p&gt;During the presentation a question was asked regarding drill through. I mentioned the possibility of using a drill through button but I did not have enough time to demonstrate. Here is a video to explain the feature.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;The final Power BI report files with the other resources can be &lt;a class="link" href="https://lgb123-my.sharepoint.com/:f:/g/personal/laura_graham-brown_co_uk/Ek04kFW8hbRNpCJxLahZlX8BPqXMTBy47f1o7ahr6zvUPA?e=QofSGz" target="_blank" rel="noopener"
 &gt;found here.&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="youtube"&gt;YouTube
&lt;/h3&gt;&lt;p&gt;As soon as the Reactor posts the video the link will be added here.&lt;/p&gt;
&lt;h2 id="london-reactor-posts"&gt;London Reactor Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-power-bi-introduction-resources/" target="_blank" rel="noopener"
 &gt;Power BI Introduction&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-introduction-weather-report-resources/" target="_blank" rel="noopener"
 &gt;Weather Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/" target="_blank" rel="noopener"
 &gt;Use AI Visuals to Analyse Titanic Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/" target="_blank" rel="noopener"
 &gt;Christmas Carol Text Analysis&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/" target="_blank" rel="noopener"
 &gt;Last Year’s Sales&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/" target="_blank" rel="noopener"
 &gt;Tea &amp;amp; Biscuits&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Import Text Using Examples</title><link>https://hatfullofdata.blog/power-bi-import-text-using-examples/</link><pubDate>Sat, 22 Aug 2020 22:22:45 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-import-text-using-examples/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-import-text-using-examples/cover.png" alt="Featured image of post Power BI – Import Text Using Examples" /&gt;&lt;p&gt;Import text using examples was introduced in the 2020 August update for Power BI. It writes the Power Query steps to transform a non-tabular text file into a table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="from import to table" class="gallery-image" data-flex-basis="680px" data-flex-grow="283" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_000.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;img alt="youtube video" class="gallery-image" data-flex-basis="427px" data-flex-grow="178" height="382" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_000yt.png" width="680"&gt;&lt;a class="link" href="https://youtu.be/6h7g-CwkeVg" target="_blank" rel="noopener"
 &gt;https://youtu.be/6h7g-CwkeVg&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="enabling-the-feature"&gt;Enabling the Feature
&lt;/h3&gt;&lt;p&gt;At the point of writing this blog post this feature is still in preview. The feature is enabled in File – Options in Preview features. It will like most features move to being enabled for everyone at some point.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Enable import text using examples feature" class="gallery-image" data-flex-basis="356px" data-flex-grow="148" height="458" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_001-1.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="example-import-text-using-examples"&gt;Example Import text using Examples
&lt;/h3&gt;&lt;p&gt;For this example I have a very simple text file as shown in first picture in this post. It contains the details of journeys on different days. So when I select Get Data – Text/CSV and select the file, the dialog that shows a preview of the data in the file has a new button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing Extract Table Using Examples button" class="gallery-image" data-flex-basis="319px" data-flex-grow="133" height="511" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the button is clicked a new dialog opens a dialog box with a data preview showing and an empty table. This means we need to enter in some answers into the table so a pattern can be calculated how to transform the data. When you start to type in a value it will suggest possible values.&lt;/p&gt;
&lt;p&gt;A column is renamed by double clicking on the column title and entering a new name.&lt;/p&gt;
&lt;p&gt;&lt;img alt="entering first column into import text file using example\n" class="gallery-image" data-flex-basis="321px" data-flex-grow="133" height="508" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;With only one value it cannot calculate the pattern required. When I have added more values it can determine the pattern. It often needs less values in future columns. In this example 2 dates were needed for the first column and then only one value for the remaining columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="showing stages of adding example values in\n" class="gallery-image" data-flex-basis="1191px" data-flex-grow="496" height="137" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the above example the Distance column was only part of the row of data. It calculates the ways to split the data. After this and all the columns have been added, we click Transform Data to see the Power Query steps that the import feature have been written.&lt;/p&gt;
&lt;h3 id="looking-at-the-power-query"&gt;Looking at the Power Query
&lt;/h3&gt;&lt;p&gt;So the magic behind this new feature is it writes a 10+ step query for you with a pretty good pattern for doing this. So the 5 steps after the source are working out how many rows make a block of data and grouping that data into one block. The next chunk of steps are splitting that block into separate columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="look at the power query created by import text by using examples" class="gallery-image" data-flex-basis="511px" data-flex-grow="213" height="319" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="how-does-import-text-using-example-decide-the-block-length"&gt;How does import text using example decide the block length?
&lt;/h3&gt;&lt;p&gt;This for me is the clever part. Step three where it adds the conditional column is the crucial step. So I looked at three slightly different versions of the text file to see how it changes.&lt;/p&gt;
&lt;h4 id="example-1"&gt;Example 1
&lt;/h4&gt;&lt;p&gt;&lt;img alt="step 3 when starting with a date" class="gallery-image" data-flex-basis="497px" data-flex-grow="207" height="328" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In this example each of the blocks start with a date, which means the line starts with a number. Step 3 uses a test to see if in position 0 there is a number. So for this example, we could have as many rows as we liked in a block as long as the first row is the only row starting with a number.&lt;/p&gt;
&lt;h4 id="example-2"&gt;Example 2
&lt;/h4&gt;&lt;p&gt;&lt;img alt="example 2 starting with the word date." class="gallery-image" data-flex-basis="497px" data-flex-grow="207" height="328" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In this example the blocks start with the word “Date”. Step 3 looks for the line starting with “Date” as the first line. This is pattern is a great one as it works fine for different length blocks as long as the only lines starting with “Date”.&lt;/p&gt;
&lt;h4 id="example-3"&gt;Example 3
&lt;/h4&gt;&lt;p&gt;&lt;img alt="example 3 when there is no obvious pattern" class="gallery-image" data-flex-basis="499px" data-flex-grow="207" height="327" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-import-text-using-examples/TextImport_008.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In this example there is no easy way to identify the top row of the data. This means the only pattern it can determine is by length of the block so it guesses 4. This works if the data is in same length blocks.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;I like the new import text using examples feature and I can see places where it will get used. I hope it gets progressed to recognise more patterns and be more flexible. When it works it stops the report writer needing to put together the Power Query steps to do the transform.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Q&amp;A Synonyms Update</title><link>https://hatfullofdata.blog/power-bi-qa-synonyms-update/</link><pubDate>Sat, 15 Aug 2020 17:53:05 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-qa-synonyms-update/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/cover.png" alt="Featured image of post Power BI – Q&amp;A Synonyms Update" /&gt;&lt;p&gt;Q&amp;amp;A is a great tool for report readers to ask questions regarding the data behind the report. The natural language interpretation is improving all the time and can be improved by using Q&amp;amp;A synonyms. The July 2020 Power BI update added a new way to add synonyms to a report.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=sv0SDItfhZE" target="_blank" rel="noopener"
 &gt;&lt;img alt="link to Q&amp;A Synonyms on YouTube" class="gallery-image" data-flex-basis="464px" data-flex-grow="193" height="351" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_001.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="without-qa-synonyms"&gt;Without Q&amp;amp;A Synonyms
&lt;/h3&gt;&lt;p&gt;On report I have added a Q&amp;amp;A button to allow a report reader to open a dialog to ask a question. Different people will use different terms for the same thing. A word that is not recognised will be underlined in red.&lt;/p&gt;
&lt;p&gt;&lt;img alt="underline text that is not understood." class="gallery-image" data-flex-basis="690px" data-flex-grow="287" height="236" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_002.png" width="679"&gt;&lt;/p&gt;
&lt;h3 id="adding-a-qa-synonym-by-a-rename"&gt;Adding a Q&amp;amp;A Synonym by a rename
&lt;/h3&gt;&lt;p&gt;A synonym is an alternative word with the same meaning. In the example report the table is called Products with a Product Name column, but the products are toys. Therefore “Toy” in the context this report is a synonym of “Product”.&lt;/p&gt;
&lt;p&gt;The July 2020 update introduced a new method to add a synonym to the report. When a field is renamed in the visualisation pane a suggested synonym term is created.&lt;/p&gt;
&lt;p&gt;&lt;img alt="renaming a column" class="gallery-image" data-flex-basis="882px" data-flex-grow="367" height="185" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;With the suggested synonym term created the natural language interpretation will now understand Toy means Product Name. When the question is asked using Toy the question using Product Name will be suggested.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="570px" data-flex-grow="237" height="286" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_004-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After a few moments it will quickly show you a slight alternative with what question the current result is. It will also underline the word Toys in a orange dotted line.&lt;/p&gt;
&lt;h3 id="modifying-qa-synonyms"&gt;Modifying Q&amp;amp;A Synonyms
&lt;/h3&gt;&lt;p&gt;&lt;img alt="MOdeling ribbon" class="gallery-image" data-flex-basis="1337px" data-flex-grow="557" height="122" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The Q&amp;amp;A setup button is on the Modelling ribbon tab. When the dialog opens, click on Field Synonyms to see the synonyms. Expand the relevant table and you will see the synonyms applies to each column.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="400px" data-flex-grow="166" height="408" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_007.png" width="680"&gt;
The Q&amp;amp;A setup button is on the Modelling ribbon tab. When the dialog opens, click on Field Synonyms to see the synonyms. Expand the relevant table and you will see the synonyms applies to each column.&lt;/p&gt;
&lt;p&gt;In my example you can see Toy has been added to the Product Name column in the suggested terms. This means alternative questions will be offered if Toy is used in a question.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Q&amp;A Synonym terms" class="gallery-image" data-flex-basis="558px" data-flex-grow="232" height="292" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_008.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click the X to remove a term. When you click the + the term will be promoted to a Term. Visually it will move to the left.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Promoting a term" class="gallery-image" data-flex-basis="1406px" data-flex-grow="586" height="116" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_009.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="re-asking-the-question"&gt;Re-asking the Question
&lt;/h2&gt;&lt;p&gt;Once the Q&amp;amp;A synonym has been promoted to a term rather than a suggested term, you no longer get another question offered.&lt;/p&gt;
&lt;p&gt;&lt;img alt="question asked after the Q&amp;A synonym has become a term" class="gallery-image" data-flex-basis="640px" data-flex-grow="266" height="255" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-qa-synonyms-update/Synonyms_010.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Q&amp;amp;A is an under used feature in Power BI. As report writers we assume we know best, and our report consumers’ questions have all been answered. We should add Q&amp;amp;A buttons, educate our users in how to use it and then collect the stats on questions asked, but that is for another blog post!&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Thank You! One Year On</title><link>https://hatfullofdata.blog/thank-you-one-year-on/</link><pubDate>Thu, 06 Aug 2020 10:39:15 +0000</pubDate><guid>https://hatfullofdata.blog/thank-you-one-year-on/</guid><description>&lt;img src="https://hatfullofdata.blog/thank-you-one-year-on/legopeeps.jpg" alt="Featured image of post Thank You! One Year On" /&gt;&lt;p&gt;At the end of July 2019 I decided to posting more regularly to my own blog and on the 5th August 2019 I posted my first video on YouTube. This post is to say thank you to anyone reading this and any other post or watching a video.&lt;/p&gt;
&lt;p&gt;I remember being highly amused when I got 25 subscribers and when people I respected in the community re-tweeted my links to blog posts and YouTube videos. I find it amazing that in July 2020 I had almost 9,000 page views of my blog and over 3,400 views of my videos. They can’t all be my dad, can they?&lt;/p&gt;
&lt;p&gt;So I would like to thank you, the people who read my blog posts, watched my videos, subscribed, re-tweeted and even tweeted their own tweets regarding my content. I’ve been unbearably happy when my posts have been included in community leader round-ups. It has now become a passion of mine to blog and record videos and every like, comment or smile I get is what I do it for.&lt;/p&gt;
&lt;p&gt;If you haven’t yet found my YouTube channel it is at&lt;a class="link" href="https://www.youtube.com/lauragbpowerplatform" target="_blank" rel="noopener"
 &gt;https://www.youtube.com/lauragbpowerplatform&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="the-data"&gt;The Data
&lt;/h3&gt;&lt;p&gt;But let’s be honest really I like the numbers. The pretty charts that show numbers going up, the ways you can track what is going on it is all fascinating for a data geek like me. Without even loading data into Power BI I can get charts and see progress.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Page views on my blog from Google Analytics" class="gallery-image" data-flex-basis="680px" data-flex-grow="283" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/thank-you-one-year-on/pageviewschart.jpg" width="680"&gt;Page views on my blog from Google Analytics&lt;/p&gt;
&lt;p&gt;&lt;img alt="Google Search Console Results Chart" class="gallery-image" data-flex-basis="572px" data-flex-grow="238" height="285" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/thank-you-one-year-on/google-search.jpg" width="680"&gt;Google Search Console Results&lt;/p&gt;
&lt;p&gt;&lt;img alt="YouTube Views" class="gallery-image" data-flex-basis="502px" data-flex-grow="209" height="325" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/thank-you-one-year-on/youtubechart.jpg" width="680"&gt;YouTube views&lt;/p&gt;
&lt;p&gt;I am no expert on Google analytics and promoting sites etc. Megan Walker has done a great series on setting it up and &lt;a class="link" href="https://meganvwalker.com/category/google-analytics/" target="_blank" rel="noopener"
 &gt;click here to open it&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="advice"&gt;Advice
&lt;/h3&gt;&lt;p&gt;When I first started my blog I got one piece of advice from a friend, Pieter Veenstra who has a very successful blog &lt;a class="link" href="https://sharepains.com/" target="_blank" rel="noopener"
 &gt;SharePains&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Every time you are asked a technical question, write a blog post as the answer.&lt;/p&gt;
&lt;p&gt;Pieter Veenstra 2019&lt;/p&gt;
&lt;p&gt;I’ve not managed to follow that completly but it has meant I always have topics to blog or record about. I haven’t got organised enough to promise a post every week or a video every week. One pattern I will endeavour to follow though is every video gets a supporting blog post.&lt;/p&gt;
&lt;p&gt;So to pass the advice on, if you get asked technical questions, start a blog or YouTube channel.&lt;/p&gt;
&lt;h2 id="thank-you-to-everyone"&gt;Thank You to everyone!
&lt;/h2&gt;</description></item><item><title>Power BI – Endorse a Dataset as Promoted or Certified</title><link>https://hatfullofdata.blog/power-bi-endorse-a-dataset/</link><pubDate>Sat, 01 Aug 2020 13:47:21 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-endorse-a-dataset/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/cover.png" alt="Featured image of post Power BI – Endorse a Dataset as Promoted or Certified" /&gt;&lt;p&gt;Connecting to an existing dataset is highly recommended if the data is the same. In order to encourage report builders to select the right datasets you can endorse a dataset as promoted or certified.&lt;/p&gt;
&lt;h3 id="youtube"&gt;YouTube
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=u16UvIHroGg" target="_blank" rel="noopener"
 &gt;&lt;img alt="youtube link" class="gallery-image" data-flex-basis="359px" data-flex-grow="149" height="454" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="connecting-to-a-dataset"&gt;Connecting to a Dataset
&lt;/h3&gt;&lt;p&gt;&lt;img alt="datasets in a workspace" class="gallery-image" data-flex-basis="445px" data-flex-grow="185" height="296" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_001.png" width="549"&gt;&lt;/p&gt;
&lt;p&gt;When a report writer looks at a workspace they can see the datasets available in that workspace. When the report writer goes to Power BI desktop and selects Power BI datasets they are given an alphabetical list of datasets from all the workspaces they have access to.&lt;/p&gt;
&lt;p&gt;&lt;img alt="list of datasets to connect to" class="gallery-image" data-flex-basis="430px" data-flex-grow="179" height="379" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;There are two types of endorsement, promoted which any dataset owner can apply and certified that only selected people can apply. These datasets will appear at the top of the list of datasets when connecting.&lt;/p&gt;
&lt;h3 id="endorse-a-dataset-as-promoted"&gt;Endorse a Dataset as Promoted
&lt;/h3&gt;&lt;p&gt;In the workspace, click on the ellipse menu on the dataset and select Settings. The last option in settings is Endorsement, expand this to see the options. Click on Promoted and click apply.&lt;/p&gt;
&lt;p&gt;&lt;img alt="endorse a dataset as promoted" class="gallery-image" data-flex-basis="338px" data-flex-grow="141" height="482" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_003.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="enabling-certification"&gt;Enabling Certification
&lt;/h3&gt;&lt;p&gt;By default users cannot endorse a dataset as certified. This is more restricted to keep the certified label use limited to datasets that have been checked. The Certified option will be greyed out for most users.&lt;/p&gt;
&lt;p&gt;If you are a Power BI Admin you will be able to set up who can certify a dataset in the Admin Portal. From any dataset in the Power BI website, click on the three dots in the top right of the window, select Settings and then Admin portal.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="286px" data-flex-grow="119" height="569" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the Admin Portal, select Tenant settings and then scroll down to find Certification. Expanding that section reveals a toggle button enable Certification. Once enabled, you can select who it applies to by entering in a security group. Click Apply to save your changes. It can take up to 15 minutes for the changes to take effect.&lt;/p&gt;
&lt;p&gt;&lt;img alt="enabling certifications" class="gallery-image" data-flex-basis="350px" data-flex-grow="145" height="466" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_005-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Note : A company that has guidance on certification of a dataset, can add the url to that guidance in the documentation page box. Any dataset owner can then click on Learn more to see your company guidance.&lt;/p&gt;
&lt;p&gt;&lt;img alt="access company guidance" class="gallery-image" data-flex-basis="2472px" data-flex-grow="1030" height="66" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_006.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="endorse-a-dataset-as-certified"&gt;Endorse a Dataset as Certified
&lt;/h3&gt;&lt;p&gt;In the workspace, click on the ellipse menu on the dataset and select Settings. The last option in settings is Endorsement, expand this to see the options. Click on Certified and click apply.&lt;/p&gt;
&lt;p&gt;&lt;img alt="endorse a dataset as certified" class="gallery-image" data-flex-basis="331px" data-flex-grow="137" height="493" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_007.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="updated-connecting-to-a-dataset"&gt;Updated Connecting to a Dataset
&lt;/h3&gt;&lt;p&gt;Now when a report writer, from Power BI desktop, wants to connect to a dataset they will be offered certified datasets, then promoted datasets, with all other datasets listed afterwards.&lt;/p&gt;
&lt;p&gt;&lt;img alt="connecting to endorsed datsets" class="gallery-image" data-flex-basis="439px" data-flex-grow="183" height="371" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-endorse-a-dataset/Endorse_008-1.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;One dataset to maintain and refresh is the best option, so anything that gets users to connect to the correct dataset is a great idea. Two levels of endorsing works quite well. Dataset owners promote their own datasets. Companies certify datasets that they have checked out.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Gradient Legends</title><link>https://hatfullofdata.blog/power-bi-gradient-legends/</link><pubDate>Sat, 25 Jul 2020 21:11:21 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-gradient-legends/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-gradient-legends/cover.png" alt="Featured image of post Power BI – Gradient Legends" /&gt;&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;In the July 2020 update to Power BI Microsoft introduced a new feature of Gradient Legends to help annotate the colours used in a colour scale conditional formatting. When conditional formatting is applied to a visual it is important to make sure the reader of the report understands what the different colours on the report mean. Is purple good? Is orange ok?&lt;/p&gt;
&lt;p&gt;&lt;img alt="Gradient Legends" class="gallery-image" data-flex-basis="1203px" data-flex-grow="501" height="127" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_000-1.png" width="637"&gt;&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=jIbSLvoENPA" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube image" class="gallery-image" data-flex-basis="366px" data-flex-grow="152" height="445" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/Power-BI-Gradient-Legend-Thumbnail.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="adding-conditional-formatting"&gt;Adding Conditional Formatting
&lt;/h3&gt;&lt;p&gt;&lt;img alt="turnover chart without conditional formatting" class="gallery-image" data-flex-basis="390px" data-flex-grow="162" height="307" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_001.png" width="500"&gt;&lt;/p&gt;
&lt;p&gt;In this chart we have Turnover plotted for every month as a bar chart. The sales manager now wants to colour each bar based on the profit margin.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="166px" data-flex-grow="69" height="430" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_002.png" width="299"&gt;&lt;/p&gt;
&lt;p&gt;They select the chart and select the format section of the visualization pane. Under data colours they click the fx button next to the colour to open the conditional formatting dialog box.&lt;/p&gt;
&lt;p&gt;&lt;img alt="conditional formatting dialog" class="gallery-image" data-flex-basis="416px" data-flex-grow="173" height="392" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then the sales manager changes the field selected to the measure already setup of Profit Margin. They then can change the colours for the minimum and maximum values before pressing OK to apply the formatting.&lt;/p&gt;
&lt;p&gt;&lt;img alt="chart with conditional formatting" class="gallery-image" data-flex-basis="387px" data-flex-grow="161" height="310" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_004.png" width="500"&gt;&lt;/p&gt;
&lt;h3 id="view-legend"&gt;View Legend
&lt;/h3&gt;&lt;p&gt;Not all visuals have the legend turned on by default. The legend can be turned on in the visualizations pane.&lt;/p&gt;
&lt;p&gt;&lt;img alt="turn on legend" class="gallery-image" data-flex-basis="255px" data-flex-grow="106" height="286" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_005.png" width="305"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="gradient legend" class="gallery-image" data-flex-basis="1076px" data-flex-grow="448" height="107" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_006-1.png" width="480"&gt;&lt;/p&gt;
&lt;h3 id="changing-values-in-gradient-legends"&gt;Changing Values in Gradient Legends
&lt;/h3&gt;&lt;p&gt;The min and max values will be calculated based on the data. These can be adjusted by returning to the conditional formatting dialog box, via visualizations pane and data colours and clicking on the fx button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="round numbers for the gradient legend" class="gallery-image" data-flex-basis="432px" data-flex-grow="180" height="377" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then for the min and max values change from Auto to custom for the value and type in the values. If a plotted value is below the minimum it will be the minimum colour and the same is for maximum. In this example we have just gone to the nearest 5%.&lt;/p&gt;
&lt;p&gt;&lt;img alt="2 value gradient legends" class="gallery-image" data-flex-basis="1066px" data-flex-grow="444" height="104" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_008.png" width="462"&gt;&lt;/p&gt;
&lt;h3 id="adding-a-middle-colour"&gt;Adding a middle colour
&lt;/h3&gt;&lt;p&gt;A mid-way third colour can added to the colour scale and that will update the legend to match.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding a third colour to gradient legends" class="gallery-image" data-flex-basis="430px" data-flex-grow="179" height="379" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_009.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Return back to the conditional formatting of the column colour and tick the diverging box. This will now add a third colour. After you click okay, the legend will now be updated to show all the values.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Chart with Gradient Legend" class="gallery-image" data-flex-basis="391px" data-flex-grow="163" height="417" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-gradient-legends/gradient-legend_010.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;For those who use colour scale conditional formatting this is a great addition to make their story on the dashboard crystal clear. Adding gradient legends is crucial to annotate charts clearly.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Introducing Sync Slicers</title><link>https://hatfullofdata.blog/power-bi-introducing-sync-slicers/</link><pubDate>Wed, 15 Jul 2020 08:50:19 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-introducing-sync-slicers/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/cover.png" alt="Featured image of post Power BI – Introducing Sync Slicers" /&gt;&lt;p&gt;How many reports have duplicate slicers across the pages and the report reader has to re-apply the slicer values on each page? This post covers what the sync slicers feature in Power BI is.&lt;/p&gt;
&lt;h2&gt;Slicer Series&lt;/h2&gt;
&lt;p&gt;This series will cover different topics regarding slicers.&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-slicer-introduction/"&gt;Slicers Introduction&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-resetting-slicers-with-a-bookmark-button/"&gt;Resetting Slicers with a Bookmark Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-cascading-slicers/"&gt;Cascading Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-hierarchy-slicer/"&gt;Hierarchy Slicer&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Sync Slicers&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/"&gt;Clear all Slicers Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;Relative Date Slicer&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=92HJNdcU5ns" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube link" class="gallery-image" data-flex-basis="434px" data-flex-grow="180" height="376" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/sync_001-1.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="sync-slicers-pane"&gt;Sync Slicers Pane
&lt;/h3&gt;&lt;p&gt;On the View ribbon tab there is a Sync Slicer button which will show the Sync Slicer pane. When you click a slicer it will list the pages and show which pages already contain that slicer. In the Example shown below the ShopName slicer is on the Summary and Turnover pages but not on the Volume page.&lt;/p&gt;
&lt;p&gt;&lt;img alt="steps to show sync slicers pane" class="gallery-image" data-flex-basis="1039px" data-flex-grow="433" height="157" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/sync_002.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="sync-slicers"&gt;Sync Slicers
&lt;/h3&gt;&lt;p&gt;In the above example, if the slicer on the Summary page is set to Daisy Delights the slicer on the Turnover page will not change. This is due to no ticks in the sync column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="sync slicers" class="gallery-image" data-flex-basis="181px" data-flex-grow="75" height="507" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/sync_003.png" width="383"&gt;&lt;/p&gt;
&lt;p&gt;When the two pages have ticks next to them the slicers will sync. This means that selecting one shop on Summary will select the same shop on the Turnover page.&lt;/p&gt;
&lt;h3 id="copy-slicers"&gt;Copy Slicers
&lt;/h3&gt;&lt;p&gt;In the example above the Volume page does not have the Shop slicer. If the sync tick is selected the Volume page will be filtered using the slicer from the other pages.&lt;/p&gt;
&lt;p&gt;When the view slicer is ticked, a copy of the slicer with exactly the same formatting and position will be placed onto the Volume page.&lt;/p&gt;
&lt;p&gt;Deleting the slicer from the page will stop the page being synced with other pages.&lt;/p&gt;
&lt;h3 id="advanced-options"&gt;Advanced Options
&lt;/h3&gt;&lt;p&gt;The advanced options really confused me. So a google search found me a great video from Reid at Havens Consulting explaining what they mean.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=dZIG72afz84" target="_blank" rel="noopener"
 &gt;&lt;img alt="Havens video" class="gallery-image" data-flex-basis="448px" data-flex-grow="186" height="364" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/sync_004.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Adding the same group name to each slicer, makes the slicers sync which fields they contain and the filters applied. I highly recommend watching the above video to see a full explanation.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Sync slicers is a great feature for reports that contain multiple pages and slicers are used cater for different people.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Personalize Visuals</title><link>https://hatfullofdata.blog/power-bi-personalize-visuals/</link><pubDate>Fri, 10 Jul 2020 19:49:35 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-personalize-visuals/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-personalize-visuals/cover.png" alt="Featured image of post Power BI – Personalize Visuals" /&gt;&lt;p&gt;In the May 2020 Power BI Desktop update they introduced the idea of allowing a reader of a report to personalize visuals and bookmarking these changes. This post walks through how to enable it for a report and how to enable and disable for each visual.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=HEiGYqKls-Y" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="400px" data-flex-grow="166" height="408" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/personalise_vis_000.png" width="680"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="turning-on-personalize-visuals"&gt;Turning On Personalize Visuals
&lt;/h3&gt;&lt;p&gt;At the point of writing this blog post personalise visuals is still in preview so you need to head to File – Options &amp;amp; Settings – Options, and then from the Options dialog select Preview Features and turn on Personalize Visuals. This may require a Power BI restart.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Preview features turn on Personalize Visuals" class="gallery-image" data-flex-basis="356px" data-flex-grow="148" height="458" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/Worksheets_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Secondly you will need to turn on personalising visuals for your current report. So in Options, under Current File select Report Settings. The last option in there is Personalize Visuals, you need to tick Allow report readers to personalize visuals.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Report Settings allow personalize visuals on this report." class="gallery-image" data-flex-basis="359px" data-flex-grow="149" height="454" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/Worksheets_002.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adjusting-individual-visuals"&gt;Adjusting Individual Visuals
&lt;/h3&gt;&lt;p&gt;By default, once Personalize Visuals has been turned on in a report, all visuals in the report can be personalised. You can disable it on any visual by selecting the visual, then looking under Format and searching for person and turning it off.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Format visual" class="gallery-image" data-flex-basis="244px" data-flex-grow="101" height="295" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/personalise_vis_003.png" width="300"&gt;&lt;/p&gt;
&lt;h3 id="personalize-visuals-in-a-published-report"&gt;Personalize Visuals in a Published Report
&lt;/h3&gt;&lt;p&gt;To personalize a visual in a published report, click on the personalize button in the visual header.&lt;/p&gt;
&lt;p&gt;&lt;img alt="selected visual" class="gallery-image" data-flex-basis="401px" data-flex-grow="167" height="406" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/personalise_vis_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The then Personalize pane will open up next to the visual and the chart type and fields used can be changed. A reader will not be able to change the formatting of the visual.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="608px" data-flex-grow="253" height="268" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/personalise_vis_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="saving-personalisations-as-a-bookmark"&gt;Saving Personalisations as a Bookmark
&lt;/h3&gt;&lt;p&gt;Any changes made to visuals in reports can be saved as a personal bookmark. In the top right hand corner of the browser window click Bookmarks and then Add a personal bookmark. Enter in the name of the bookmark and click Save.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Saving changes in a bookmark." class="gallery-image" data-flex-basis="1039px" data-flex-grow="433" height="157" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/personalise_vis_006-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Access the list of bookmarks by clicking on the drop down in the top right hand corner.&lt;/p&gt;
&lt;h3 id="sharing-your-changes-with-another-person"&gt;Sharing your changes with another person
&lt;/h3&gt;&lt;p&gt;One great way to give feedback to a report designer would be to show them the personalizations you’ve done to their report. If you have person to share you can click the Share button at the top of the report.&lt;/p&gt;
&lt;p&gt;Enter their details and add a message if required. Tick Include my changes and then click Share. They will receive an email giving them a link that includes the changes you made to the visuals.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Share your personalize visuals" class="gallery-image" data-flex-basis="175px" data-flex-grow="72" height="932" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-personalize-visuals/personalise_vis_007.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;This feature is great when different report readers want to adjust what the original designer did or different charts to be tried out. I know designers who will not want anyone to change anything and designers who perhaps will be more tolerant.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Reactor – Power BI Introduction Resources</title><link>https://hatfullofdata.blog/reactor-power-bi-introduction-resources/</link><pubDate>Mon, 22 Jun 2020 14:08:28 +0000</pubDate><guid>https://hatfullofdata.blog/reactor-power-bi-introduction-resources/</guid><description>&lt;p&gt;This post is to support my virtual session at London Reactor on 22nd June. It will include the recording and links to the data source and the final Power BI Report.&lt;/p&gt;
&lt;p&gt;Link to Recording will go here….&lt;/p&gt;
&lt;h3 id="data-used-at-reactorand-final-file"&gt;Data Used at Reactorand Final File
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://lgb123-my.sharepoint.com/:x:/g/personal/laura_graham-brown_co_uk/EUHeazMHMG1MsHTCUv2Ch30Bi6rhDoYvhAecxLMaXQO3ow?e=0zE0Sf" target="_blank" rel="noopener"
 &gt;Data in a single Excel File&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Final PBIX File&lt;/p&gt;
&lt;h3 id="links-to-great-resources"&gt;Links to great Resources
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/channel/UCFp1vaKzpfvoGai0vE5VJ0w" target="_blank" rel="noopener"
 &gt;Guy in a Cube&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/" target="_blank" rel="noopener"
 &gt;SQL BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://powerbi.microsoft.com/en-us/blog/" target="_blank" rel="noopener"
 &gt;Microsoft’s Blog&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/category/power-bi/" target="_blank" rel="noopener"
 &gt;Chris Webb&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.thebiccountant.com/" target="_blank" rel="noopener"
 &gt;BI Accountant&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/channel/UCM6Ooy5GZl7R1m6oU0-1vFw" target="_blank" rel="noopener"
 &gt;My YouTube&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="london-reactor-posts"&gt;London Reactor Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-power-bi-introduction-resources/" target="_blank" rel="noopener"
 &gt;Power BI Introduction&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-introduction-weather-report-resources/" target="_blank" rel="noopener"
 &gt;Weather Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-analyse-titanic-data-with-ai-visuals/" target="_blank" rel="noopener"
 &gt;Use AI Visuals to Analyse Titanic Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/reactor-christmas-carol-text-analysis/" target="_blank" rel="noopener"
 &gt;Christmas Carol Text Analysis&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-reactor-last-years-sales/" target="_blank" rel="noopener"
 &gt;Last Year’s Sales&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-tea-biscuits-session-reactor/" target="_blank" rel="noopener"
 &gt;Tea &amp;amp; Biscuits&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>The Anxious MVP</title><link>https://hatfullofdata.blog/the-anxious-mvp/</link><pubDate>Wed, 03 Jun 2020 18:22:41 +0000</pubDate><guid>https://hatfullofdata.blog/the-anxious-mvp/</guid><description>&lt;img src="https://hatfullofdata.blog/the-anxious-mvp/target.png" alt="Featured image of post The Anxious MVP" /&gt;&lt;p&gt;The buzz of being nominated for an MVP is great, adding the community activities you do with passion all working towards what is built up to being a huge a goal. Hopefully eventually you get the email we’ve all seen in social media to say you’ve been awarded an MVP. You put out the messages saying how humbled, honoured, happy and other words beginning to h and everyone celebrates with you, you get followed, connected to by people you’ve never heard of and you stick the blue badge everywhere. For me that happened 1st December 2019.&lt;/p&gt;
&lt;p&gt;You’re now a member of a community of people who do some amazing things and work extremely hard to make the Microsoft user community what it is. Behind the scenes there is huge amount of work most people never see. Congratulations, life goal achieved.&lt;/p&gt;
&lt;p&gt;Then I fell apart. The community is huge, everyone else seemed to know what they were doing and where they were going and I didn’t. Maybe I wasn’t really invited, maybe I shouldn’t be there atall. Maybe no-one wants me here.&lt;/p&gt;
&lt;p&gt;Why didn’t I reach out to my friends in the community? Anxiety.Why didn’t I reach out to my amazing MVP  co-ordinator in the UK? Up to being awarded the MVP in my head she had been the judge I sure as heck wasn’t going to admit she might be wrong.Why did I just hide away? Anxiety&lt;/p&gt;
&lt;p&gt;&lt;img alt="lost puppy" class="gallery-image" data-flex-basis="323px" data-flex-grow="134" height="505" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/the-anxious-mvp/6month_001-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When a community is a busy vibrant community it is fantastic when you know where things are and you’ve found your seat… Until that point for the anxious amongst us, it is as scary as hell. Imagine a scared puppy at Oxford Circus in the pre-Christmas rush, that was me.&lt;/p&gt;
&lt;p&gt;I was rescued, Claire my MVP co-ordinator was great when I admitted I was struggling. Various friends helped me out, then a community friend was my sanity and stopped me giving up. I was about to resign my MVP. Thankfully he got his MVP a few days ago, he totally gets the we rise by building up others. A smile, a simple “are you okay?”, stepping back to expand a circle wider to welcome people in, remembering someone’s name, saying hello, were simple actions that helped me. And I hope I do in return for others.&lt;/p&gt;
&lt;p&gt;&lt;img alt="radar" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="512" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/the-anxious-mvp/radar.png" width="512"&gt;&lt;/p&gt;
&lt;p&gt;So why write this post? It is not my normal how-to post. I’m aware that I am not alone in struggling with the social side of community. I wanted to make sure people knew they weren’t alone if they felt anxious. More importantly I wanted to reach out to community members to have their radar up for the person who might be struggling. My anxiety is mild, it is real but most of the time few know it exists. I have no history to cause my anxiety, I’m employed, happy family, life is good. Anxiety is just part of my makeup.&lt;/p&gt;
&lt;p&gt;My desire to be an MVP was to be a member of the community. What I’ve learnt is I was already a member and people around me wanted me there. No badges required. Okay I’ve learnt that logically, still a way to go to learn that emotionally. I’m not 100% “okay”, I doubt I ever will be, but this is who I am. My anxiety is part of the real me; if I was “fixed” would I be me?&lt;/p&gt;</description></item><item><title>Power Apps – Embed a Power BI Chart</title><link>https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/</link><pubDate>Sun, 31 May 2020 12:57:14 +0000</pubDate><guid>https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/</guid><description>&lt;img src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/cover.png" alt="Featured image of post Power Apps – Embed a Power BI Chart" /&gt;&lt;p&gt;This post covers how to embed a Power BI chart from a published report into a Power App, handling a tile that doesn’t appear and then filtering the embedded chart.&lt;/p&gt;
&lt;h3 id="youtube-video"&gt;YouTube Video
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/M-rGoq_Lf3Q" target="_blank" rel="noopener"
 &gt;&lt;img alt="link to YouTube video" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_000.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="creating-the-chart-tile"&gt;Creating the Chart Tile
&lt;/h3&gt;&lt;p&gt;The report must be published to a workspace that the app users will have access to. When you open in the Power BI service in the visual header is a pin, clicking this will prompt to “Pin” your visual to a dashboard.&lt;/p&gt;
&lt;p&gt;&lt;img alt="pin chart dialog" class="gallery-image" data-flex-basis="954px" data-flex-grow="397" height="171" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the dialog appears select either an Existing dashboard or a New dashboard. If you are using Themes do remember to select Keep current theme on the left hand side. Click Pin to finish pinning your chart to the dashboard.&lt;/p&gt;
&lt;p&gt;&lt;img alt="pin complete message" class="gallery-image" data-flex-basis="556px" data-flex-grow="232" height="293" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When the visual has been pinned you will get a notification in the top right of the browser window with a button to navigate you to the dashboard. The dashboard can also be found in the workspace list. On the dashboard you can see the pinned tiles.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power BI dashboard" class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="275" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_003.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="embed-a-power-bi-chart"&gt;Embed a Power BI Chart
&lt;/h3&gt;&lt;p&gt;&lt;img alt="insert chart Power BI Tile option." class="gallery-image" data-flex-basis="320px" data-flex-grow="133" height="398" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_004.png" width="532"&gt;&lt;/p&gt;
&lt;p&gt;Within your Power App, from the Insert ribbon under Chart, select Power BI Tile. This will open a pane to select the Workspace, Dashboard and Tile. When selected the chart will appear in your app.&lt;/p&gt;
&lt;p&gt;&lt;img alt="embed a Power BI chart options" class="gallery-image" data-flex-basis="570px" data-flex-grow="237" height="286" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="fixing-the-missing-chart"&gt;Fixing the missing Chart
&lt;/h3&gt;&lt;p&gt;When I first did this no charts appeared. So a few google searches later I found Power Apps is looking for a title to be set. All of my charts had altered titles. When I tried a chart that just had the automatic title, it worked. A little more digging and I found you can set the title of a tile on a dashboard. Just opening the editor and pressing Apply fixed the problem.&lt;/p&gt;
&lt;p&gt;If you have a missing chart try the following:Open the dashboard. On the tile that Power Apps does not see, in the top right hand corner are 3 dots, click to open an options menu. From the menu select Edit details.In the Tile details pane click Apply.Save and refresh your Power App and try re-adding your tile.&lt;/p&gt;
&lt;p&gt;&lt;img alt="fix a missing embed a Power BI chart" class="gallery-image" data-flex-basis="475px" data-flex-grow="198" height="343" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The above fix has worked for every problem I’ve had so far. Please add comments if it doesn’t work for you.&lt;/p&gt;
&lt;h3 id="filtering-the-chart"&gt;Filtering the Chart
&lt;/h3&gt;&lt;p&gt;Power BI is powerful because charts can be sliced easily. When you only have a single chart from a report you don’t have the option to include slicers and filters. If you examine the Power BI control in Power Apps you will see the TileUrl property for the control is a long url.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="663px" data-flex-grow="276" height="246" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="153px" data-flex-grow="63" height="580" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_008.png" width="370"&gt;&lt;/p&gt;
&lt;p&gt;An extra parameter can be added to this url to filter the chart. The filter is written as an OData filter. You need to know the table and field names to write the filter. In this example if I look back in the Power BI report in Desktop I can see the Colour field is from the Toys table.&lt;/p&gt;
&lt;p&gt;So the filter string to filter to Red will be:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;filter=Toys/Colour eq &amp;#39;Red&amp;#39;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="filtered chart" class="gallery-image" data-flex-basis="349px" data-flex-grow="145" height="467" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/embed_009.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The colour could come from a drop down or a variable. Remember to include the single quotes needed around the filter value. Also spacing is important so don’t add any extras!&lt;/p&gt;
&lt;h3 id="conclusion-to-embed-a-power-bi-chart"&gt;Conclusion to Embed a Power BI Chart
&lt;/h3&gt;&lt;p&gt;Embedding a Power BI Tile is a great addition to a Power App but it does have limitations. The dataset behind the Power BI report will need to be refreshed to reflect any changes and refreshed are limited to 8 times a day or 48 times in a premium workspace.&lt;/p&gt;
&lt;h2 id="more-power-apps-posts"&gt;More Power Apps Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-transparency-update/" target="_blank" rel="noopener"
 &gt;Transparency Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/" target="_blank" rel="noopener"
 &gt;Using JSON Feature to Save Pictures&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-object-detect-model/" target="_blank" rel="noopener"
 &gt;AI Builder Object Detect Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-function-component/" target="_blank" rel="noopener"
 &gt;Function Component&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;SVG in Power Apps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-12-days-of-components/" target="_blank" rel="noopener"
 &gt;12 Days of Components&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Build a Responsive App series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/" target="_blank" rel="noopener"
 &gt;Embed a Power BI Chart&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Replace Values for Whole Table</title><link>https://hatfullofdata.blog/power-query-replace-values-for-whole-table/</link><pubDate>Wed, 15 Apr 2020 15:40:57 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-replace-values-for-whole-table/</guid><description>&lt;img src="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/cover.png" alt="Featured image of post Power Query – Replace Values for Whole Table" /&gt;&lt;p&gt;Today’s challenge was to replace the values on all the columns in the query when I know the columns will change so I don’t want to name them.&lt;/p&gt;
&lt;h3 id="quick-answer"&gt;Quick Answer
&lt;/h3&gt;&lt;p&gt;For those who don’t want the long explanation. Do replace values on at least one column to get the replace step. In the example below the previous step is #’Changed Type’ and the columns are Jan 20 and Feb 20.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= Table.ReplaceValue(#&amp;#34;Changed Type&amp;#34;,null,0,Replacer.ReplaceValue,{&amp;#34;Jan 20&amp;#34;, &amp;#34;Feb 20&amp;#34;})
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Remove the {…} section and replace it with Table.ColumnNames(Previous Step)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= Table.ReplaceValue(#&amp;#34;Changed Type&amp;#34;,null,0,Replacer.ReplaceValue,Table.ColumnNames(#&amp;#34;Changed Type&amp;#34;))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Replace values with named columns" class="gallery-image" data-flex-basis="1052px" data-flex-grow="438" height="155" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/ReplaceAll_001.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Replace values on all columns" class="gallery-image" data-flex-basis="1110px" data-flex-grow="462" height="147" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/ReplaceAll_002.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="longer-answer"&gt;Longer Answer
&lt;/h3&gt;&lt;p&gt;Replace values is a powerful tool for coping with null values and errors. When you select multiple columns and select Replaces values a step is written in that includes a list of column names, eg {“column1″,”column2″,”column3”}. If your data structure changes that step will either break because a column is missing or will not include a new column.&lt;/p&gt;
&lt;p&gt;The function Table.ColumnNames(StepName) returns a list of column names from the named step. To see this result and filter the list right click on a step and select Insert Step After. Edit the new step to be Table.ColumnNames(StepName)&lt;/p&gt;
&lt;p&gt;&lt;img alt="Column name list" class="gallery-image" data-flex-basis="1046px" data-flex-grow="435" height="156" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/ReplaceAll_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The list of column names can be filtered, even though there is no drop down arrow. Right click on the value to remove and select Remove Item.&lt;/p&gt;
&lt;p&gt;&lt;img alt="column name list" class="gallery-image" data-flex-basis="680px" data-flex-grow="283" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/ReplaceAll_004.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If I then rename this step to ColumnNames I can then use that step name in a replace step.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Replace Values using named step" class="gallery-image" data-flex-basis="943px" data-flex-grow="393" height="173" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/ReplaceAll_005.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="note"&gt;Note
&lt;/h3&gt;&lt;p&gt;Yes the Replaced Value step is refering to a calculation that comes after it (yup its wacky). If you reorder the steps by dragging them Power Query will decide to change the code so steps refer to the new previous step.&lt;/p&gt;
&lt;h3 id="references"&gt;References
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/powerquery-m/table-columnnames" target="_blank" rel="noopener"
 &gt;Microsoft Docs Table.ColumnNames&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-query-posts"&gt;More Power Query Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Custom Handwritten Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-replace-values-for-whole-table/" target="_blank" rel="noopener"
 &gt;Replace Values for Whole Table&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-ai-insights-error/" target="_blank" rel="noopener"
 &gt;AI Insights Error&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/excel-power-query-vba-to-edit-a-parameter-value/" target="_blank" rel="noopener"
 &gt;VBA to Edit a Parameter Value&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-dynamic-data-source-and-web-content/" target="_blank" rel="noopener"
 &gt;Dynamic Data Source and Web.Contents()&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-get-previous-row-data/" target="_blank" rel="noopener"
 &gt;Get Previous Row Data&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-creating-new-parameters/" target="_blank" rel="noopener"
 &gt;Creating New Parameters&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fixing-missing-columns-dynamically/" target="_blank" rel="noopener"
 &gt;Fixing Missing Columns Dynamically&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handling-null-values/" target="_blank" rel="noopener"
 &gt;Handling Null Values Properly&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Apps – Build a Responsive App – Adding Dynamic Containers</title><link>https://hatfullofdata.blog/power-apps-responsive-app-dynamic-containers/</link><pubDate>Thu, 09 Apr 2020 16:00:16 +0000</pubDate><guid>https://hatfullofdata.blog/power-apps-responsive-app-dynamic-containers/</guid><description>&lt;p&gt;In this post we will use dynamic containers to arrange out content so it moves to the planned location at the different screen sizes. We will need to calculate the screen size and then use it to position and size the containers.&lt;/p&gt;
&lt;p&gt;This post assumes you’ve done everything in the first 2 posts.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube version
&lt;/h3&gt;&lt;p&gt;This series is to support my YouTube video.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=UWy5_JRH1FE" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube image link" class="gallery-image" data-flex-basis="385px" data-flex-grow="160" height="187" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-responsive-app-dynamic-containers/Responsive_001.jpg" width="300"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The posts for this series are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Planning a Responsive App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/" target="_blank" rel="noopener"
 &gt;Initial setup of the App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-adding-dynamic-containers/" target="_blank" rel="noopener"
 &gt;Adding Dynamic Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dynamic Content&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="calculate-screen-size"&gt;Calculate Screen Size
&lt;/h3&gt;&lt;p&gt;In order to make the calculations simple we are going to add a label called AppScreenSize which contains a calculation to classify the screen size to one of small, medium, large and extra large.&lt;/p&gt;
&lt;p&gt;For this we are going to use a property of the App object, SizeBreakpoints. It contains a list of numbers for the dividing points of the screen sizes. So under 600 will be small, 600 to 900 will be medium, 900 to 1200 will be large and above 1200 will be extra large.&lt;/p&gt;
&lt;p&gt;&lt;img alt="App SizeBreakpoints" class="gallery-image" data-flex-basis="582px" data-flex-grow="242" height="280" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-responsive-app-dynamic-containers/Responsive_202.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We then add a label, renamed to AppScreenSize and change the text property to the following formula.&lt;/p&gt;
&lt;p&gt;&lt;img alt="AppScreenSize calculation" class="gallery-image" data-flex-basis="1020px" data-flex-grow="425" height="160" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-responsive-app-dynamic-containers/Responsive_201.jpg" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt; 10
&lt;/span&gt;&lt;span class="lnt"&gt; 11
&lt;/span&gt;&lt;span class="lnt"&gt; 12
&lt;/span&gt;&lt;span class="lnt"&gt; 13
&lt;/span&gt;&lt;span class="lnt"&gt; 14
&lt;/span&gt;&lt;span class="lnt"&gt; 15
&lt;/span&gt;&lt;span class="lnt"&gt; 16
&lt;/span&gt;&lt;span class="lnt"&gt; 17
&lt;/span&gt;&lt;span class="lnt"&gt; 18
&lt;/span&gt;&lt;span class="lnt"&gt; 19
&lt;/span&gt;&lt;span class="lnt"&gt; 20
&lt;/span&gt;&lt;span class="lnt"&gt; 21
&lt;/span&gt;&lt;span class="lnt"&gt; 22
&lt;/span&gt;&lt;span class="lnt"&gt; 23
&lt;/span&gt;&lt;span class="lnt"&gt; 24
&lt;/span&gt;&lt;span class="lnt"&gt; 25
&lt;/span&gt;&lt;span class="lnt"&gt; 26
&lt;/span&gt;&lt;span class="lnt"&gt; 27
&lt;/span&gt;&lt;span class="lnt"&gt; 28
&lt;/span&gt;&lt;span class="lnt"&gt; 29
&lt;/span&gt;&lt;span class="lnt"&gt; 30
&lt;/span&gt;&lt;span class="lnt"&gt; 31
&lt;/span&gt;&lt;span class="lnt"&gt; 32
&lt;/span&gt;&lt;span class="lnt"&gt; 33
&lt;/span&gt;&lt;span class="lnt"&gt; 34
&lt;/span&gt;&lt;span class="lnt"&gt; 35
&lt;/span&gt;&lt;span class="lnt"&gt; 36
&lt;/span&gt;&lt;span class="lnt"&gt; 37
&lt;/span&gt;&lt;span class="lnt"&gt; 38
&lt;/span&gt;&lt;span class="lnt"&gt; 39
&lt;/span&gt;&lt;span class="lnt"&gt; 40
&lt;/span&gt;&lt;span class="lnt"&gt; 41
&lt;/span&gt;&lt;span class="lnt"&gt; 42
&lt;/span&gt;&lt;span class="lnt"&gt; 43
&lt;/span&gt;&lt;span class="lnt"&gt; 44
&lt;/span&gt;&lt;span class="lnt"&gt; 45
&lt;/span&gt;&lt;span class="lnt"&gt; 46
&lt;/span&gt;&lt;span class="lnt"&gt; 47
&lt;/span&gt;&lt;span class="lnt"&gt; 48
&lt;/span&gt;&lt;span class="lnt"&gt; 49
&lt;/span&gt;&lt;span class="lnt"&gt; 50
&lt;/span&gt;&lt;span class="lnt"&gt; 51
&lt;/span&gt;&lt;span class="lnt"&gt; 52
&lt;/span&gt;&lt;span class="lnt"&gt; 53
&lt;/span&gt;&lt;span class="lnt"&gt; 54
&lt;/span&gt;&lt;span class="lnt"&gt; 55
&lt;/span&gt;&lt;span class="lnt"&gt; 56
&lt;/span&gt;&lt;span class="lnt"&gt; 57
&lt;/span&gt;&lt;span class="lnt"&gt; 58
&lt;/span&gt;&lt;span class="lnt"&gt; 59
&lt;/span&gt;&lt;span class="lnt"&gt; 60
&lt;/span&gt;&lt;span class="lnt"&gt; 61
&lt;/span&gt;&lt;span class="lnt"&gt; 62
&lt;/span&gt;&lt;span class="lnt"&gt; 63
&lt;/span&gt;&lt;span class="lnt"&gt; 64
&lt;/span&gt;&lt;span class="lnt"&gt; 65
&lt;/span&gt;&lt;span class="lnt"&gt; 66
&lt;/span&gt;&lt;span class="lnt"&gt; 67
&lt;/span&gt;&lt;span class="lnt"&gt; 68
&lt;/span&gt;&lt;span class="lnt"&gt; 69
&lt;/span&gt;&lt;span class="lnt"&gt; 70
&lt;/span&gt;&lt;span class="lnt"&gt; 71
&lt;/span&gt;&lt;span class="lnt"&gt; 72
&lt;/span&gt;&lt;span class="lnt"&gt; 73
&lt;/span&gt;&lt;span class="lnt"&gt; 74
&lt;/span&gt;&lt;span class="lnt"&gt; 75
&lt;/span&gt;&lt;span class="lnt"&gt; 76
&lt;/span&gt;&lt;span class="lnt"&gt; 77
&lt;/span&gt;&lt;span class="lnt"&gt; 78
&lt;/span&gt;&lt;span class="lnt"&gt; 79
&lt;/span&gt;&lt;span class="lnt"&gt; 80
&lt;/span&gt;&lt;span class="lnt"&gt; 81
&lt;/span&gt;&lt;span class="lnt"&gt; 82
&lt;/span&gt;&lt;span class="lnt"&gt; 83
&lt;/span&gt;&lt;span class="lnt"&gt; 84
&lt;/span&gt;&lt;span class="lnt"&gt; 85
&lt;/span&gt;&lt;span class="lnt"&gt; 86
&lt;/span&gt;&lt;span class="lnt"&gt; 87
&lt;/span&gt;&lt;span class="lnt"&gt; 88
&lt;/span&gt;&lt;span class="lnt"&gt; 89
&lt;/span&gt;&lt;span class="lnt"&gt; 90
&lt;/span&gt;&lt;span class="lnt"&gt; 91
&lt;/span&gt;&lt;span class="lnt"&gt; 92
&lt;/span&gt;&lt;span class="lnt"&gt; 93
&lt;/span&gt;&lt;span class="lnt"&gt; 94
&lt;/span&gt;&lt;span class="lnt"&gt; 95
&lt;/span&gt;&lt;span class="lnt"&gt; 96
&lt;/span&gt;&lt;span class="lnt"&gt; 97
&lt;/span&gt;&lt;span class="lnt"&gt; 98
&lt;/span&gt;&lt;span class="lnt"&gt; 99
&lt;/span&gt;&lt;span class="lnt"&gt;100
&lt;/span&gt;&lt;span class="lnt"&gt;101
&lt;/span&gt;&lt;span class="lnt"&gt;102
&lt;/span&gt;&lt;span class="lnt"&gt;103
&lt;/span&gt;&lt;span class="lnt"&gt;104
&lt;/span&gt;&lt;span class="lnt"&gt;105
&lt;/span&gt;&lt;span class="lnt"&gt;106
&lt;/span&gt;&lt;span class="lnt"&gt;107
&lt;/span&gt;&lt;span class="lnt"&gt;108
&lt;/span&gt;&lt;span class="lnt"&gt;109
&lt;/span&gt;&lt;span class="lnt"&gt;110
&lt;/span&gt;&lt;span class="lnt"&gt;111
&lt;/span&gt;&lt;span class="lnt"&gt;112
&lt;/span&gt;&lt;span class="lnt"&gt;113
&lt;/span&gt;&lt;span class="lnt"&gt;114
&lt;/span&gt;&lt;span class="lnt"&gt;115
&lt;/span&gt;&lt;span class="lnt"&gt;116
&lt;/span&gt;&lt;span class="lnt"&gt;117
&lt;/span&gt;&lt;span class="lnt"&gt;118
&lt;/span&gt;&lt;span class="lnt"&gt;119
&lt;/span&gt;&lt;span class="lnt"&gt;120
&lt;/span&gt;&lt;span class="lnt"&gt;121
&lt;/span&gt;&lt;span class="lnt"&gt;122
&lt;/span&gt;&lt;span class="lnt"&gt;123
&lt;/span&gt;&lt;span class="lnt"&gt;124
&lt;/span&gt;&lt;span class="lnt"&gt;125
&lt;/span&gt;&lt;span class="lnt"&gt;126
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; App.Width
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Now the label shows “Extra Large”.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Adding Title Bar Container
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;In my example the title bar is the same for every screen size so is the simplest to position and size. It will start in the top left hand corner so x,y will be 0,0. The height is going to be 80 and the width needs to fit the full screen width. The screen is the parent of the container so we can use Parent.Width.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Within the container I’ve placed a text label that will start in 0,0 and the width and height match are Parent.Width and Parent.Height. I also set the text to be AppScreenSize.Text &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; ” App”. Finally I formatted the text label.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![Title bar dynamic containers](Responsive_203.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#### MainTitleContainer
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;X0Y0Height80WidthParent.Width
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### First Test
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The app is now ready to save and publish. The main test is to check the app resizes correctly and the title bar changes.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![first test of dynamic container](Responsive_204.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Adding Dynamic Containers
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Now we are going to add the containers that will move based on the screen size. In total there are 4 containers to add. The left hand side people selector, the right hand side people information which will contain the final 2 containers that sit side by side in large and extra large and above each other on a medium screen.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The next container we add is the container down the left hand side. It needs to fit in below the title bar container and fill to the bottom of the screen. For the small screen size the width will be the whole screen width, for all other sizes it will be 350 wide.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![LHS Dynamic Containers](Responsive_205.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#### PeopleSelectorContainer
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;X0YMainTitleContainer.HeightHeightParent.Height-MainTitleContainer.HeightWidthSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Small&amp;#34; , Parent.Width ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    350
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The next container is the People Info container for the right hand side of the screen. This will fill the remaining part of the screen for all sizes except small when it will be 0 width and not seen.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Note I coloured the containers just so we could see the sizes.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![People info dynamic containers](Responsive_206.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#### PeopleInfoContainer
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;XPeopleSelectorContainer.WidthYMainTitleContainer.HeightHeightParent.Height-MainTitleContainer.HeightWidthSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Small&amp;#34; , 0 ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    Parent.Width - PeopleSelectorContainer.Width
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Second Test
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With the two dynamic containers added we can publish and test again to make sure the PeopleSelector resizes to full screen for the small size and the PeopleInfoContainer takes up the right hand side when for any size except small.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![testing People info dynamic containers](Responsive_207.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Nested Dynamic Containers
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The last two containers will be child containers of the PeopleInfoContainer. For Large and Extra Large screen size they will sit side by side, for Medium screen size they will be one above the other, and for Small it won’t matter because the parent container will be 0 width.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![nested People info dynamic containers](Responsive_208.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#### PeopleInfo1Container
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;XPeopleSelectorContainer.WidthYMainTitleContainer.HeightHeight400WidthSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Medium&amp;#34; , Parent.Width ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    Parent.Width /2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#### PeopleInfo2Container
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;XSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Medium&amp;#34; , Parent.Width ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    Parent.Width /2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)YSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Medium&amp;#34; , PeopleInfo1Container.Height ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)HeightSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Medium&amp;#34; , Parent.Height - PeopleInfo1Container.Height ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    PeopleInfo1Container.Height
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)WidthSwitch(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    AppScreenSize.Text,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &amp;#34;Medium&amp;#34; , Parent.Width ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    Parent.Width /2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Final Test
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;We now have 4 dynamic containers that should all be responsive to the screen size, so we save and publish.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![final test](Responsive_209.jpg)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## Conclusion
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Responsive design takes time, lots of time. This is why good web coders are paid the rate they are paid, it is a skilled job. Building an app to be fully responsive will take time. I hope this post gives you enough to get going along with the resources from Microsoft.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Resources
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Microsoft have some resources found at
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout](https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## More Power Apps Posts
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Transparency Update](https://hatfullofdata.blog/powerapps-transparency-update/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Using JSON Feature to Save Pictures](https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [AI Builder Object Detect Model](https://hatfullofdata.blog/ai-builder-object-detect-model/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Function Component](https://hatfullofdata.blog/powerapps-function-component/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [SVG in Power Apps series](https://hatfullofdata.blog/powerapps-svg-introduction/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [12 Days of Components](https://hatfullofdata.blog/power-apps-12-days-of-components/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Build a Responsive App series](https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Embed a Power BI Chart](https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Power Apps – Build a Responsive App – Initial Setup</title><link>https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/</link><pubDate>Wed, 08 Apr 2020 16:09:24 +0000</pubDate><guid>https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/</guid><description>&lt;p&gt;A responsive app resizes the app based on the browser window and moves parts of the app to make the app work in different screen sizes. The most common sizes to handle are monitor, tablet and mobile phone.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube version
&lt;/h3&gt;&lt;p&gt;This series is to support my YouTube video.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=UWy5_JRH1FE" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube image link" class="gallery-image" data-flex-basis="385px" data-flex-grow="160" height="187" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/Responsive_001.jpg" width="300"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The posts for this series are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Planning a Responsive App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/" target="_blank" rel="noopener"
 &gt;Initial setup of the App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-adding-dynamic-containers/" target="_blank" rel="noopener"
 &gt;Adding Dynamic Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dynamic Content&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="create-the-responsive-app"&gt;Create the Responsive App
&lt;/h3&gt;&lt;p&gt;In the video and for my example I design the app based on a the larger size and then calculate where things will move or transform to become the smaller sized app for a phone for example.&lt;/p&gt;
&lt;p&gt;&lt;img alt="create app" class="gallery-image" data-flex-basis="377px" data-flex-grow="157" height="432" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/Responsive_0011.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="app-settings"&gt;App Settings
&lt;/h3&gt;&lt;p&gt;The first change to make inside the app is to turn off Scale to fit which allow us to control sizing etc.&lt;/p&gt;
&lt;p&gt;From under the File tab, click on Settings and then Screen size + Orientation. Scroll down to the Advanced settings and turn off Scale to fit.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Turn off Scale to fit" class="gallery-image" data-flex-basis="391px" data-flex-grow="163" height="417" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/Responsive_002.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="enabling-containers"&gt;Enabling Containers
&lt;/h3&gt;&lt;p&gt;As of April 2020 containers are still an experimental feature. For the html writers, containers are like the div element. They allow the developer to group items that are sized and positioned within the container, and then specify the size and position of the container. This makes a responsive design possible rather than a very complex design nightmare.&lt;/p&gt;
&lt;p&gt;Features can be turn on from File &amp;gt; Settings &amp;gt; Advanced Settings, scroll down and find Containers&lt;/p&gt;
&lt;p&gt;&lt;img alt="Turn on container control" class="gallery-image" data-flex-basis="526px" data-flex-grow="219" height="310" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/Responsive_003.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="settings-screen-size"&gt;Settings Screen Size
&lt;/h3&gt;&lt;p&gt;By default the screen height of every screen in an app is set to Max(App.Height, App.DesignHeight). This assumes the app is designed small and the screen should expand. I prefer to do the reverse and design the larger size and work out how to scale down. So I set the screen height and width to be App.Height and App.Width.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="184px" data-flex-grow="76" height="843" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/Responsive_004.jpg" width="647"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;The app is now ready to add containers to fit the plan we created earlier. The next post will be adding the containers.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;Microsoft have some resources found at&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-apps-posts"&gt;More Power Apps Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-transparency-update/" target="_blank" rel="noopener"
 &gt;Transparency Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/" target="_blank" rel="noopener"
 &gt;Using JSON Feature to Save Pictures&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-object-detect-model/" target="_blank" rel="noopener"
 &gt;AI Builder Object Detect Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-function-component/" target="_blank" rel="noopener"
 &gt;Function Component&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;SVG in Power Apps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-12-days-of-components/" target="_blank" rel="noopener"
 &gt;12 Days of Components&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Build a Responsive App series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/" target="_blank" rel="noopener"
 &gt;Embed a Power BI Chart&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Apps – Build a Responsive App – Planning</title><link>https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/</link><pubDate>Wed, 08 Apr 2020 15:54:03 +0000</pubDate><guid>https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/</guid><description>&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;Planning a responsive app is vital. A responsive app resizes the app based on the browser window and moves parts of the app to make the app work in different screen sizes. The most common sizes to handle are monitor, tablet and mobile phone. Just like a choreographer has work out the position of every dancer in a dance you need to work out the position and form of different elements at every screen size.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube version
&lt;/h3&gt;&lt;p&gt;This series is to support my YouTube video.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=UWy5_JRH1FE" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube image link" class="gallery-image" data-flex-basis="385px" data-flex-grow="160" height="187" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/Responsive_001.jpg" width="300"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The posts for this series are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Planning a Responsive App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-initial-setup/" target="_blank" rel="noopener"
 &gt;Initial setup of the App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-adding-dynamic-containers/" target="_blank" rel="noopener"
 &gt;Adding Dynamic Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dynamic Content&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="screen-sizes"&gt;Screen Sizes
&lt;/h3&gt;&lt;p&gt;Although the app can be made to react to even the smallest screen size change it makes logical sense to work with a few screen sizes and these are based on the width of the screen. The sizes we will work with are small, medium, large and extra large.&lt;/p&gt;
&lt;h3 id="layout-planning"&gt;Layout Planning
&lt;/h3&gt;&lt;p&gt;For this series we will be working with a simple people app that will have three layouts. The Extra Large and Large size have the same layout, the Medium size rearranges the info boxes to be on top of each other and the small hides the info box completely and will have navigation to another screen for the info boxes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Layout Planning" class="gallery-image" data-flex-basis="222px" data-flex-grow="92" height="735" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/Responsive_101.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="further-planning"&gt;Further Planning
&lt;/h3&gt;&lt;p&gt;Each container will need some planning to select how they will look in the different layouts. For example the Gallery in the Large and Extra Large layouts could container less data as you have the info boxes, where as the small only shows the Gallery on the front screen so although its a smaller screen you might want more information in the gallery.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;You need at least a simple wire frame before you start creating the app. Each section of the screen probably needs extra planning but this can be done once you have the app structure working.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;Microsoft have some resources found at&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – COALESCE Function to Remove Blanks</title><link>https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/</link><pubDate>Fri, 03 Apr 2020 09:27:01 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/</guid><description>&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;This post walks through a simple use of the coalesce function to prevent a measure returning a Blank. The example used is a simple measure.&lt;/p&gt;
&lt;p&gt;&lt;img alt="data card showing blank" class="gallery-image" data-flex-basis="386px" data-flex-grow="160" height="317" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/coalesce_001.jpg" width="510"&gt;&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;img alt="youtube video" class="gallery-image" data-flex-basis="390px" data-flex-grow="162" height="307" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/coalesce_000.jpg" width="500"&gt;&lt;/p&gt;
&lt;h3 id="measure"&gt;Measure
&lt;/h3&gt;&lt;p&gt;The above image shows a card that displays the Total Sales measure and due to slicer selections on the page it returns a blank. The measure is a simple SUMX calculation of Transactions[Qty] * Related Products[Price].&lt;/p&gt;
&lt;p&gt;&lt;img alt="measure details" class="gallery-image" data-flex-basis="2472px" data-flex-grow="1030" height="66" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/coalesce_002.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-coalesce"&gt;Adding Coalesce
&lt;/h3&gt;&lt;p&gt;Coalesce function can take multiple parameters. It evaluates the first one, if that returns a value it returns that value, if it returns a blank the function moves onto the next parameter and continues until it finds a non-blank value. If all the calculations return a blank the function returns a blank.&lt;/p&gt;
&lt;p&gt;In this example we would like the Blank to be replaced with zero. In other measures you might want it to be another value. So we wrap the whole calculation in a coalesce function.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding coalesce function" class="gallery-image" data-flex-basis="1095px" data-flex-grow="456" height="149" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/coalesce_003.jpg" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Total Sales = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Return 0 if blank
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;COALESCE (
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SUMX ( Transactions, Transactions[Qty] * RELATED ( Products[Price] ) ) ,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The card now shows a zero value. The Measure was also formatted to be a currency, so we get £0.00.&lt;/p&gt;
&lt;p&gt;&lt;img alt="zero value in card after adding coalesce function" class="gallery-image" data-flex-basis="368px" data-flex-grow="153" height="324" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/coalesce_004.jpg" width="497"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;This is just a simple example of how the coalesce function can improve the output from measures. The zero could be a string such as “No Sales” or could be an alternative calculation followed by a zero if both calculations returned a blank.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Introducing the Hierarchy Slicer</title><link>https://hatfullofdata.blog/power-bi-hierarchy-slicer/</link><pubDate>Wed, 25 Mar 2020 19:45:03 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-hierarchy-slicer/</guid><description>&lt;p&gt;Does your data include a hierarchy? We often can end up with multiple slicers to walk the hierarchy taking up valuable screen. This post does a quick walk through using the new hierarchy slicer.&lt;/p&gt;
&lt;h2&gt;Slicer Series&lt;/h2&gt;
&lt;p&gt;This series will cover different topics regarding slicers.&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-slicer-introduction/"&gt;Slicers Introduction&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-resetting-slicers-with-a-bookmark-button/"&gt;Resetting Slicers with a Bookmark Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-cascading-slicers/"&gt;Cascading Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Hierarchy Slicer&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/"&gt;Sync Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/"&gt;Clear all Slicers Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;Relative Date Slicer&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/0s30i2rIclY" target="_blank" rel="noopener"
 &gt;&lt;img alt="youtuve screen shot" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-hierarchy-slicer/slicer_300.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="adding-a-hierarchy-slicer"&gt;Adding a Hierarchy Slicer
&lt;/h2&gt;&lt;p&gt;Add a slicer from the visualisation pane and add the top level of the hierarchy, for example ProdRange from my products table. A tick list will appear just as previously.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding first field to hierarchy slicer" class="gallery-image" data-flex-basis="406px" data-flex-grow="169" height="401" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-hierarchy-slicer/slicer_301.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The add the next level down of the hierarchy into the Field box under the top level field. The slicer will now have down arrows that can be clicked to expand to show the next level down of the hierarchy.&lt;/p&gt;
&lt;p&gt;NoteIn March 2020 you need to activate the Hierarchy Slicer in File – Options – Preview features and then save and restart Power BI. When this visual is not in preview you won’t have to.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding second field to hierarchy slicer" class="gallery-image" data-flex-basis="381px" data-flex-grow="158" height="428" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-hierarchy-slicer/slicer_302.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Multiple layers can be added to the hierarchy. Of course the usability of the slicer needs to be considered when adding many layers.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding multiple layers to hierarchy slicer" class="gallery-image" data-flex-basis="359px" data-flex-grow="149" height="454" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-hierarchy-slicer/slicer_303.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="formatting-a-hierarchy-slicer"&gt;Formatting a Hierarchy Slicer
&lt;/h2&gt;&lt;p&gt;This slicer can still be formatted as a drop down or changed to be single select. The single select allows a whole level of the hierarchy to be selected such as the whole year or a whole month.&lt;/p&gt;
&lt;p&gt;&lt;img alt="formatting the slicer" class="gallery-image" data-flex-basis="576px" data-flex-grow="240" height="283" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-hierarchy-slicer/slicer_304.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="using-search"&gt;Using Search
&lt;/h2&gt;&lt;p&gt;When search is turned on in a tick list the search returns the terms plus the parents or children of the items returned.&lt;/p&gt;
&lt;p&gt;&lt;img alt="hierarchy search" class="gallery-image" data-flex-basis="464px" data-flex-grow="193" height="269" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-hierarchy-slicer/slicer_305.jpg" width="521"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The Hierarchy slicer is a great addition to Power BI and I am sure will replace groups of multiple slicers in many reports.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Reset Slicers with a Bookmark Button</title><link>https://hatfullofdata.blog/power-bi-reset-slicers-with-a-bookmark-button/</link><pubDate>Mon, 09 Mar 2020 12:11:00 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-reset-slicers-with-a-bookmark-button/</guid><description>&lt;p&gt;When your report has a bunch of slicers and charts that can also add filters to the page resetting back to no filters can be painful. So we need a quick way to reset slicers. This post walks through the steps of creating a bookmark and the using that bookmark to reset the page by clicking a button.&lt;/p&gt;
&lt;h2&gt;Slicer Series&lt;/h2&gt;
&lt;p&gt;This series will cover different topics regarding slicers.&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-slicer-introduction/"&gt;Slicers Introduction&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Resetting Slicers with a Bookmark Button&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-cascading-slicers/"&gt;Cascading Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-hierarchy-slicer/"&gt;Hierarchy Slicer&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/"&gt;Sync Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/"&gt;Clear all Slicers Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;Relative Date Slicer&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;This post will walk through the stages to add a reset button to a report. It comes in 2 parts, firstly create a bookmark that removes filters and then to add button that applies the bookmark as its action.&lt;/p&gt;
&lt;h3 id="youtube-version"&gt;YouTube Version
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/tTwSaHYAWyU" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-reset-slicers-with-a-bookmark-button/slicer_100-1.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="create-bookmark"&gt;Create Bookmark
&lt;/h3&gt;&lt;p&gt;Bookmarks include the current status of slicers on the current page. So the first job is to clear all the slicers and make sure to selections on charts is filtering the data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;From the View ribbon, select Bookmarks&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on the Add button and a bookmark will appear.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double click on the bookmark to rename it&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="create bookmark to reset slicers" class="gallery-image" data-flex-basis="414px" data-flex-grow="172" height="379" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-reset-slicers-with-a-bookmark-button/slicer_101.jpg" width="654"&gt;&lt;/p&gt;
&lt;p&gt;The bookmark can be tested by selecting some options on the slicers and then clicking on the bookmark name and the slicer options should be cleared.&lt;/p&gt;
&lt;p&gt;You can now close the Bookmarks pane.&lt;/p&gt;
&lt;h3 id="adding-reset-button"&gt;Adding Reset Button
&lt;/h3&gt;&lt;p&gt;A bookmark action can be added to a Button, Shape or Image. Select one from the Insert ribbon tab. In the format of the button / shape / image click the Action to be on, change the Type to be Bookmark anf the Bookmark to be the bookmark you created.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Button options" class="gallery-image" data-flex-basis="440px" data-flex-grow="183" height="249" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-reset-slicers-with-a-bookmark-button/slicer_102.jpg" width="457"&gt;&lt;/p&gt;
&lt;p&gt;When viewing the report in Power BI desktop you need to hold the CTRL key when you click the button. In the Power BI Service, i.e. where your report is published you will not need the CTRL key.&lt;/p&gt;
&lt;p&gt;You can add a message into the the Tooltip to assist your report consumers.&lt;/p&gt;
&lt;h3 id="updating-bookmarks"&gt;Updating Bookmarks
&lt;/h3&gt;&lt;p&gt;When you add new slicers or reformat your slicers it is always a good idea to update your bookmarks. Open the bookmarks pane from the View ribbon tab. Click on the … next to the bookmark name and select Update.&lt;/p&gt;
&lt;p&gt;&lt;img alt="update bookmark" class="gallery-image" data-flex-basis="236px" data-flex-grow="98" height="376" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-reset-slicers-with-a-bookmark-button/slicer_103.jpg" width="371"&gt;&lt;/p&gt;
&lt;h3 id="conclusion-to-reset-slicers"&gt;Conclusion to Reset Slicers
&lt;/h3&gt;&lt;p&gt;It is important that your report is easy to use. Adding a button so you are able to reset slicers is a good step towards that.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Slicers Introduction</title><link>https://hatfullofdata.blog/power-bi-slicers-introduction/</link><pubDate>Fri, 06 Mar 2020 11:17:56 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-slicers-introduction/</guid><description>&lt;h2&gt;Slicer Series&lt;/h2&gt;
&lt;p&gt;This series will cover different topics regarding slicers.&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;strong&gt;Slicers Introduction&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-resetting-slicers-with-a-bookmark-button/"&gt;Resetting Slicers with a Bookmark Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-cascading-slicers/"&gt;Cascading Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-hierarchy-slicer/"&gt;Hierarchy Slicer&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/"&gt;Sync Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/"&gt;Clear all Slicers Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;Relative Date Slicer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Power BI reports can be made more flexible using simple slicers to allow your report consumers to slice and dice the data down to what they are interested in. This post will look at the various options for formatting slicers in different ways.&lt;/p&gt;
&lt;h4 id="youtube-version"&gt;YouTube Version
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/3PmYflb9Odc" target="_blank" rel="noopener"
 &gt;&lt;img alt="youtuve link" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_000.jpg" width="320"&gt;&lt;/a&gt;YouTube version&lt;/p&gt;
&lt;h3 id="simple-slicer"&gt;Simple Slicer
&lt;/h3&gt;&lt;p&gt;Click on the slicer from Visualizations pane to add a slicer to your report.&lt;/p&gt;
&lt;p&gt;&lt;img alt="add slicer" class="gallery-image" data-flex-basis="471px" data-flex-grow="196" height="270" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_001.jpg" width="530"&gt;&lt;/p&gt;
&lt;p&gt;Then you need to drag in the value you would like to slice by, for example Shop Name. Your slicer is now ready to use.&lt;/p&gt;
&lt;p&gt;&lt;img alt="add field to slicer" class="gallery-image" data-flex-basis="494px" data-flex-grow="206" height="330" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_002.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;You can select a single value in the slicer just by clicking. You can select multiple items by holding down the Ctrl key. To clear the slicer click the eraser icon in the top right.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Eraser icon" class="gallery-image" data-flex-basis="396px" data-flex-grow="165" height="203" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_003.jpg" width="335"&gt;&lt;/p&gt;
&lt;h3 id="selection-options"&gt;Selection Options
&lt;/h3&gt;&lt;p&gt;Our slicer tick list can be tweaked in various ways to make the report fit different requirements. These options can be found in Formatting (click on the paint roller) and Selection Controls.&lt;/p&gt;
&lt;p&gt;Single select will turn the selection boxes into round radio buttons. Only one item can now be selected and there is always one item selected, i.e. you can no longer select all.&lt;/p&gt;
&lt;p&gt;&lt;img alt="single select in slicers" class="gallery-image" data-flex-basis="448px" data-flex-grow="186" height="281" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_004.jpg" width="525"&gt;&lt;/p&gt;
&lt;p&gt;Turning off Multi-select with CTRL will no longer require the ctrl key to be selected to select multiple options. This does mean you need to un-select items to remove filters. This is great for touch screens. You also get little ticks in the boxes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="multi-select in the slicer" class="gallery-image" data-flex-basis="324px" data-flex-grow="135" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_005.jpg" width="518"&gt;&lt;/p&gt;
&lt;p&gt;Show “select all” adds an option at the top of the list that will toggle turning them all on or off. Showing the “Select all” is great for when report readers will want all excluding one. Some report readers find the concept of selecting none gives you all a hard one to get their head around.&lt;/p&gt;
&lt;p&gt;&lt;img alt="select all in slicers" class="gallery-image" data-flex-basis="325px" data-flex-grow="135" height="382" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_006.jpg" width="518"&gt;&lt;/p&gt;
&lt;h3 id="button-slicers"&gt;Button Slicers
&lt;/h3&gt;&lt;p&gt;When there are only a few options in a list can be effective to change from a list to buttons. This option is not the most intuitive but easy to find when you know how.&lt;/p&gt;
&lt;p&gt;Select Format – General and change the Orientation from Vertical to Horizontal and you get buttons!&lt;/p&gt;
&lt;p&gt;&lt;img alt="slicer buttons" class="gallery-image" data-flex-basis="1026px" data-flex-grow="427" height="159" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_007.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="dropdown-slicers"&gt;Dropdown Slicers
&lt;/h3&gt;&lt;p&gt;When a list of options is long the tick list takes up too much screen space and becomes hard work to use. So we can change a tick list into a drop down.&lt;/p&gt;
&lt;p&gt;In the top right hand corner of the slicer box there is a drop down, which only shows when your cursor is over the slicer. On a simple list slicer this drop down offers List or Dropdown. Selecting Dropdown will reduce the list into a smaller drop down.&lt;/p&gt;
&lt;p&gt;&lt;img alt="dropdown slicers" class="gallery-image" data-flex-basis="642px" data-flex-grow="267" height="254" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_008.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-search"&gt;Adding Search
&lt;/h3&gt;&lt;p&gt;When a slicer has lots of options it can be useful to add a search box to the slicer. The most common place to add this is probably the drop-down but it can be added to almost any slicer.&lt;/p&gt;
&lt;p&gt;Click on the three dots at the top of the slicer window, or the the bottom if your slicer is at the top of the page! Select Search. This will add a search box to the top of the slicer options and will filter the options to match any text.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding search to slicer" class="gallery-image" data-flex-basis="400px" data-flex-grow="166" height="408" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_009.jpg" width="680"&gt;&lt;/p&gt;
&lt;h3 id="range-slicer"&gt;Range Slicer
&lt;/h3&gt;&lt;p&gt;Dates and numbers don’t work well for a list so when you add a number or date column to a slicer it will default to a range slicer. This slicer has two handles that allow you to modify the range selected.&lt;/p&gt;
&lt;p&gt;&lt;img alt="range slicers" class="gallery-image" data-flex-basis="532px" data-flex-grow="221" height="179" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-slicers-introduction/slicer_010.jpg" width="397"&gt;&lt;/p&gt;
&lt;p&gt;Clicking the top right drop down will offer Between, Before and After as different range options as well as converting to List or Dropdown.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;There are many options for slicers, you need to know your audience and which slicers they will prefer. So make sure it is obvious to your users what they are filtering. If you need slicers to filter slicers take a look at Cascading slicers.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power BI – Connecting to Project Online</title><link>https://hatfullofdata.blog/power-bi-connecting-to-project-online/</link><pubDate>Tue, 21 Jan 2020 12:22:15 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-connecting-to-project-online/</guid><description>&lt;p&gt;I have spent 12 months working with a client building a Power BI report as part of their roll out of Project Online. This post walks through connecting to Project Online to visualise the data in Power BI. And the full series will document the stages and lessons learned in the past 12 months.&lt;/p&gt;
&lt;h3 id="power-bi-and-project-online-series"&gt;Power BI and Project Online Series
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Connecting Power BI to Project Online data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Reducing columns returned by Project Online&lt;/li&gt;
&lt;li&gt;Adding Relationships into Project Online Data&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="connecting-to-project-online"&gt;Connecting to Project Online
&lt;/h3&gt;&lt;p&gt;Navigate to your Project Online site. It will have a URL similar to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://mycompany.com/sites/MyProjects/default.aspx
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="project web page" class="gallery-image" data-flex-basis="471px" data-flex-grow="196" height="299" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-project-online/Project_001.png" width="588"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="odata source" class="gallery-image" data-flex-basis="97px" data-flex-grow="40" height="446" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-project-online/Project_002.png" width="181"&gt;&lt;/p&gt;
&lt;p&gt;Start Power BI Desktop, which will open a new report.From the home ribbon click “Get Data” and find and select OData.&lt;/p&gt;
&lt;p&gt;It will prompt you for a url to the data. From the above url, replace default.aspx with _api/projectdata/. My example url becomes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://mycompany.com/sites/MyProjects/_api/projectdata/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="enter url" class="gallery-image" data-flex-basis="722px" data-flex-grow="300" height="226" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-project-online/Project_003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If required sign in with the correct details, it probably is an organizational account you need and click Connect.&lt;/p&gt;
&lt;p&gt;From the long list of tables select the tables you need. For the start of this series I’m going to just import Projects, Tasks and TimeSet. TimeSet is the calendar table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="select tables for connecting to project" class="gallery-image" data-flex-basis="302px" data-flex-grow="125" height="540" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-project-online/Project_006.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click Load ready to build your report.&lt;/p&gt;
&lt;h3 id="missing-data"&gt;Missing Data
&lt;/h3&gt;&lt;p&gt;When you edit a project in project online it prompts you to check in when you close.&lt;/p&gt;
&lt;p&gt;&lt;img alt="check in" class="gallery-image" data-flex-basis="383px" data-flex-grow="159" height="231" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-project-online/Project_004.png" width="369"&gt;&lt;/p&gt;
&lt;p&gt;But when you go load the data into project your updates will not be visible. If you have only checked in a project the whole project will be missing. You need to publish the project for the data to be visible within Power BI.&lt;/p&gt;
&lt;p&gt;The Publish button can be found on the Tasks ribbon when editing the schedule of your project. (Why is it not on the Project ribbon? Another mystery!)&lt;/p&gt;
&lt;p&gt;&lt;img alt="publish button" class="gallery-image" data-flex-basis="725px" data-flex-grow="302" height="135" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-connecting-to-project-online/Project_005.png" width="408"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;The Project Online database is huge and can contain a fascinating source of data. Due to a company being able to add extra columns and select which parts of project they use connecting to Project online can create useful reporting to enhance Project.&lt;/p&gt;
&lt;h2 id="more-power-bi-posts"&gt;More Power BI Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-conditional-formatting-update/" target="_blank" rel="noopener"
 &gt;Conditional Formatting Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-data-refresh-date/" target="_blank" rel="noopener"
 &gt;Data Refresh Date&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/" target="_blank" rel="noopener"
 &gt;Using Inactive Relationships in a Measure&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/" target="_blank" rel="noopener"
 &gt;DAX CrossFilter Function&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-coalesce-function-to-remove-blanks/" target="_blank" rel="noopener"
 &gt;COALESCE Function to Remove Blanks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-personalize-visuals/" target="_blank" rel="noopener"
 &gt;Personalize Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-gradient-legends/" target="_blank" rel="noopener"
 &gt;Gradient Legends&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-endorse-a-dataset/" target="_blank" rel="noopener"
 &gt;Endorse a Dataset as Promoted or Certified&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-qa-synonyms-update/" target="_blank" rel="noopener"
 &gt;Q&amp;amp;A Synonyms Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-import-text-using-examples/" target="_blank" rel="noopener"
 &gt;Import Text Using Examples&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/paginated-report-resources/" target="_blank" rel="noopener"
 &gt;Paginated Report Resources&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/refreshing-datasets-automatically-with-dataflow/" target="_blank" rel="noopener"
 &gt;Refreshing Datasets Automatically with Power BI Dataflows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/charticulator-simple-custom-chart/" target="_blank" rel="noopener"
 &gt;Charticulator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-connector-july-2022-update/" target="_blank" rel="noopener"
 &gt;Dataverse Connector – July 2022 Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-dataverse-choices-and-choice-column/" target="_blank" rel="noopener"
 &gt;Dataverse Choice Columns&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-switch-dataverse-tenancy/" target="_blank" rel="noopener"
 &gt;Switch Dataverse Tenancy&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-google-analytics/" target="_blank" rel="noopener"
 &gt;Connecting to Google Analytics&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-take-over-a-dataset/" target="_blank" rel="noopener"
 &gt;Take Over a Dataset&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/export-data-from-power-bi-visuals/" target="_blank" rel="noopener"
 &gt;Export Data from Power BI Visuals&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-embed-a-paginated-report/" target="_blank" rel="noopener"
 &gt;Embed a Paginated Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/using-sql-on-dataverse-for-power-bi/" target="_blank" rel="noopener"
 &gt;Using SQL on Dataverse for Power BI&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-platform-solution-and-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;Power Platform Solution and Power BI Series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-creating-a-custom-smart-narrative/" target="_blank" rel="noopener"
 &gt;Creating a Custom Smart Narrative&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-button-in-a-power-bi-report/" target="_blank" rel="noopener"
 &gt;Power Automate Button in a Power BI Report&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="power-bi-series"&gt;Power BI Series
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;SVG in Power BI series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-connecting-to-project-online/" target="_blank" rel="noopener"
 &gt;Power BI and Project Online series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-slicers-introduction/" target="_blank" rel="noopener"
 &gt;Slicers series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-bi-create-a-dataflow/" target="_blank" rel="noopener"
 &gt;Dataflow series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/" target="_blank" rel="noopener"
 &gt;Power BI SVG series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-automate-and-power-bi-rest-api/" target="_blank" rel="noopener"
 &gt;Power Automate and Power BI Rest API series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/devops-data-into-power-bi/" target="_blank" rel="noopener"
 &gt;Power BI and DevOps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Apps – 12 Days of Components</title><link>https://hatfullofdata.blog/power-apps-12-days-of-components/</link><pubDate>Fri, 27 Dec 2019 23:37:45 +0000</pubDate><guid>https://hatfullofdata.blog/power-apps-12-days-of-components/</guid><description>&lt;p&gt;Madly I decided I was going to do 12 videos on Power App components and they have had a heavy focus using SVG. This post is to provide the code and resources for each video.&lt;/p&gt;
&lt;h3 id="day-1--create-a-component"&gt;Day 1 – Create a Component
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/xsp26IgPuTc" target="_blank" rel="noopener"
 &gt;&lt;img alt="Components Day 1 video" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/day01.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Video walks through turning on components, adding an SVG image and then adding the component to a screen within the app.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-2--add-an-input"&gt;Day 2 – Add an Input
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=xMdYtTxN42E" target="_blank" rel="noopener"
 &gt;&lt;img alt="Day 3 video" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/day02.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This video adds an input, called BaubleColour which is a HEX string, to the Christmas tree component to allow the component user to select a colour for the baubles.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-3--use-table-input"&gt;Day 3 – Use Table Input
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=4kwXlsMqLrc" target="_blank" rel="noopener"
 &gt;&lt;img alt="Day 3 Video\n" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/day03.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This video uses a table of HEX strings called BaubleColours to provide a list of colours for the baubles. The colours are cycled through using a timer control.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-4--use-svg-transform"&gt;Day 4 – Use SVG Transform
&lt;/h3&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/day4.jpg" width="320"&gt;&lt;/p&gt;
&lt;p&gt;This video does a simple transform in SVG to make the star on the top of the tree rotate.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-5--flexible-resizing-of-svg"&gt;Day 5 – Flexible Resizing of SVG
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/T5hG0QtiVow" target="_blank" rel="noopener"
 &gt;&lt;img alt="Day5" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day05.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using percentage values within the SVG make the image flexible when the component is resized.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;span class="lnt"&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-6--patterned-presents"&gt;Day 6 – Patterned Presents
&lt;/h3&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day6.jpg" width="320"&gt;&lt;/p&gt;
&lt;p&gt;Using SVG patterns and a list of patterns we can add patterns to the present wrappings.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; LookUp(Parent.Patterns,PatternName=Parent.PatternName,Pattern) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/01/SVG-patterns.xlsx" target="_blank" rel="noopener"
 &gt;Excel File for SVG Patterns&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="day-7--add-a-tag-using-svg-text-and-rotate"&gt;Day 7 – Add a Tag using SVG Text and Rotate
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/RjdVo6OF11g" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day07.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using SVG Text and rotate we can create another component to draw a tag that uses an input of the name to label each present.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Parent.TagName &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="day-8--star-rating"&gt;Day 8 – Star Rating
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/ZK0Y-Jvk-_k" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day08.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Rate your New Year Resolution progress with a star rating drawn with a little SVG and a gallery.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {StarColour:If(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ThisItem.Value
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-9--fill-a-shape-using-svg-clip"&gt;Day 9 – Fill a shape using SVG Clip
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/zEWa0oBc9oQ" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day09.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Fill up a heart in colour to visualise a percentage value using a component containing SVG using a clip path.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SVG: &amp;#34;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ClipWidth: 100 * Parent.Score
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVG &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVG &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; ClipWidth &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;%
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;SVG Code to fill from the bottom up&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SVG: &amp;#34;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ClipHeight: 100 * Parent.Score,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ClipY: 100 - 100 * Parent.Score
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVG &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVG &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; ClipHeight &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;%
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-10--fill-part-stars-using-svg-clip"&gt;Day 10 – Fill Part stars using SVG Clip
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/OmLEJRGXpAw" target="_blank" rel="noopener"
 &gt;&lt;img alt="Day10" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day10.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Combining the star rating from Day 9 with the clip path from Day 10 we can improve the star rating to show part stars for a score of 2.5 etc.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; StarSVG: &amp;#34;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ClipWidth: 100 * (&amp;#39;Day10 Star Rating Improved&amp;#39;.Score - ThisItem.Value + 1)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; StarSVG &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; StarSVG &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-11--draw-a-gauge"&gt;Day 11 – Draw a Gauge
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/OAJ_dGFld7w" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day11.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Draw a simple gauge to show a percentage value using an arch and rotating a line with a simple transform.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SVGArch: &amp;#34; &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SVGRotate: 180 * Parent.Score
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVGArch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; - &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="day-12--add-colours-to-that-gauge"&gt;Day 12 – Add Colours to that Gauge
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://youtu.be/xb2--2xhvOI" target="_blank" rel="noopener"
 &gt;&lt;img class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-12-days-of-components/Day12.jpg" width="320"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lets add some colour to the gauge from day 11 of this series. We look at rotate again and how moving items partly outside the view box hides that part.&lt;/p&gt;
&lt;p&gt;SVG Code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SVGArch: &amp;#34; &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SVGRotate: 180 * Parent.Score,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; RedRotate: -180 * (1 - Parent.RedScore),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; AmberRotate: -180 * (1 - Parent.AmberScore)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVGArch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVGArch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; SVGArch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;I thoroughly enjoyed building the different components and working out the SVG code to use. I hope you have enjoyed watching. Below is the link to download a zip of the MSApp file for the components.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/wp-content/uploads/2020/01/12-Days-of-Components.zip" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/wp-content/uploads/2020/01/12-Days-of-Components.zip&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="more-power-apps-posts"&gt;More Power Apps Posts
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-transparency-update/" target="_blank" rel="noopener"
 &gt;Transparency Update&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/" target="_blank" rel="noopener"
 &gt;Using JSON Feature to Save Pictures&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-object-detect-model/" target="_blank" rel="noopener"
 &gt;AI Builder Object Detect Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-function-component/" target="_blank" rel="noopener"
 &gt;Function Component&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;SVG in Power Apps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-12-days-of-components/" target="_blank" rel="noopener"
 &gt;12 Days of Components&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Build a Responsive App series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/" target="_blank" rel="noopener"
 &gt;Embed a Power BI Chart&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Apps – Animating SVG Fill Colour and Size</title><link>https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/</link><pubDate>Sat, 23 Nov 2019 23:54:27 +0000</pubDate><guid>https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/</guid><description>&lt;p&gt;This is the second post in the SVG in Power Apps series. In this post I will introduce animating SVGs by altering the colour and size of the SVG graphic using variables and a timer control.&lt;/p&gt;
&lt;h3 id="series"&gt;Series
&lt;/h3&gt;&lt;p&gt;This series is to introduce ideas for using SVG within PowerApps to add graphics to your Apps.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;Introduction to SVG in a PowerApp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/" target="_blank" rel="noopener"
 &gt;Animating SVG colours and sizes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Multi-part SVGs&lt;/li&gt;
&lt;li&gt;Rotation and Clip Paths&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="selecting-fill-colour"&gt;Selecting Fill Colour
&lt;/h3&gt;&lt;p&gt;For this post we shall start with a simple circle SVG shape to modify using controls. The code shall start as one circle and the image control will have a border.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Simple circle SVG" class="gallery-image" data-flex-basis="340px" data-flex-grow="141" height="480" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_201.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The first control will be a drop down to select the colour. We add a drop down with a list of colours as the items and rename it to ColourDropDown.&lt;/p&gt;
&lt;p&gt;&lt;img alt="drop down items" class="gallery-image" data-flex-basis="403px" data-flex-grow="168" height="404" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_202.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We then modify the SVG code of the shape to use the selected colour in drop down. The code is now as follows.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Now the circle changes colour based on the drop down value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="svg changing colour" class="gallery-image" data-flex-basis="937px" data-flex-grow="390" height="174" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_203.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="animating-svg-size"&gt;Animating SVG Size
&lt;/h3&gt;&lt;p&gt;The next stage to use a slider to resize the circle. We add a slider and change the Min and Max values to match the requirements and renamed the slicer to SizeSlicer.&lt;/p&gt;
&lt;p&gt;&lt;img alt="size slicer properties" class="gallery-image" data-flex-basis="691px" data-flex-grow="288" height="236" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_204.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We then modify the code to use the slicer value as the radius.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="svg resizing" class="gallery-image" data-flex-basis="960px" data-flex-grow="400" height="170" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_205.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="animating-svg-colour"&gt;Animating SVG Colour
&lt;/h3&gt;&lt;p&gt;Getting a user to select a colour or size is a simple introduction idea to modifying the SVG image. The next step is to create a simple animation using a timer to modify the size. On another screen we will add a SVG shape with the fill colour and size based on two variables.&lt;/p&gt;
&lt;p&gt;First step is to add a button to setup the variables. Then we change the SVG code to use the 2 variables&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="836px" data-flex-grow="348" height="195" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_206-1.png" width="680"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The next step is to add a timer. In order to make the shape resize smooth I change the duration to 10, ie 10 milli-seconds. Also change the Repeat and Auto start to be on, so the animation will start automatically and continue to repeat.&lt;/p&gt;
&lt;p&gt;&lt;img alt="timer options for animating svg" class="gallery-image" data-flex-basis="432px" data-flex-grow="180" height="377" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/SVG_207.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next step is calculate what will happen every 10 milliseconds. The size of the shape should increase by one until it reaches a maximum value and then reduce by one until it reaches a minimum. We will need to change the code behind the setup button to set the vvChange to 1.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Reaches maximum so start decreasing
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; vvSize &amp;gt;= 60,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; UpdateContext({vvChange: -1}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Reaches minimum so start increasing
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; vvSize 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Colour Animation
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The colour of animating SVG can be specified using a hex rgb string. For example #FF0000 is red and #CCCCCC is grey. Power Apps do not include a function to translate from a number to a hex string so in a separate post I explain how to use a component as a function which can be found [here](https://hatfullofdata.blog/powerapps-function-component/) . I add this component and name it DECtoHEX_Blue.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;So the we add code to the setup button to create variables vvBlueValue set to 0 and vvBlueChange set to 1. The component is to convert the vvBlueValue into a HEX string, so we put into the component custom property DEC to be vvBlueValue.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Then we add very similar code to the size changing. The final step in the code builds the colour string ready for the SVG.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;```xml
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Reaches maximum so start decreasing
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; vvSize &amp;gt;= 60,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; UpdateContext({vvChange: -1}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Reaches minimum so start increasing
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; vvSize = 255,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; UpdateContext({vvBlueChange: -2}),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; vvBlueValue 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The animation will now have a circle that grows and shrinks and cycles from black to blue and back again.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Conclusion
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This introduces a concept of using SVG and a timer to create animations for any app. These methods could be expanded to modify the position of elements within the SVG.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## More Power Apps Posts
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Transparency Update](https://hatfullofdata.blog/powerapps-transparency-update/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Using JSON Feature to Save Pictures](https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [AI Builder Object Detect Model](https://hatfullofdata.blog/ai-builder-object-detect-model/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Function Component](https://hatfullofdata.blog/powerapps-function-component/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [SVG in Power Apps series](https://hatfullofdata.blog/powerapps-svg-introduction/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [12 Days of Components](https://hatfullofdata.blog/power-apps-12-days-of-components/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Build a Responsive App series](https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- [Embed a Power BI Chart](https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>PowerApps – Function Component</title><link>https://hatfullofdata.blog/powerapps-function-component/</link><pubDate>Sat, 26 Oct 2019 18:24:41 +0000</pubDate><guid>https://hatfullofdata.blog/powerapps-function-component/</guid><description>&lt;p&gt;This post is to describe how I solved a problem using a component. The problem was I wanted to have calculation I could reuse. In a more traditional programming environment I would write a function. Components are reusable so it kind of made sense to use one of them as a function component..&lt;/p&gt;
&lt;h3 id="calculation-details"&gt;Calculation Details
&lt;/h3&gt;&lt;p&gt;The calculation I wanted to do was convert a decimal number to a hex number. PowerApps doesn’t have a function to do this so I worked out the calculation. I added a text input to take the decimal number and then a label to contain the calculation.&lt;/p&gt;
&lt;p&gt;&lt;img alt="calculation details" class="gallery-image" data-flex-basis="264px" data-flex-grow="110" height="618" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-function-component/CompFunc_101.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="create-the-function-component"&gt;Create the Function Component
&lt;/h3&gt;&lt;p&gt;In my app I had already turned on components and added a new component. &lt;a class="link" href="https://www.youtube.com/watch?time_continue=1&amp;amp;v=AqZkUQ78e50" target="_blank" rel="noopener"
 &gt;Shane Young does a great intro to components found here&lt;/a&gt;. I then added 2 custom properties. DEC is the decimal value as an input to my component like a parameter to a function and HEX as the returned value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding custom properties to function component" class="gallery-image" data-flex-basis="480px" data-flex-grow="200" height="340" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-function-component/CompFunc_102.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I then clicked on the HEX Value to enter in a the formula as the following code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; FirstBit:(DECtoHEX.DEC-Mod(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; DECtoHEX.DEC,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 16
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ))/16,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SecondBit: Mod(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; DECtoHEX.DEC,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 16
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; If(FirstBit&amp;gt;9,Char(55+FirstBit),FirstBit) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; If(SecondBit&amp;gt;9,Char(55+SecondBit),SecondBit)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="using-the-function-component"&gt;Using the Function Component
&lt;/h3&gt;&lt;p&gt;Back on the screen of my app I can use the component using a slider value as the input. I can hide the component as it doesn’t need to be seen.&lt;/p&gt;
&lt;p&gt;I needed a HEX value to use in some SVG for an image. In this example I used a slider to determine red value from 0 to 255. I add the component and pass in the slider value into the DEC. I then use the HEX in the SVG code I’m using in an image. See my &lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;Introduction to SVG&lt;/a&gt; to explain the SVG part.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Using HEX value calculated by function component in SVG" class="gallery-image" data-flex-basis="325px" data-flex-grow="135" height="501" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-function-component/CompFunc_104.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I could then add a slider and component for green, blue and transparency to make my image fully adjustable.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Components as function opens many possibilities and as 2 of my favourite PowerApp builders Hiro and Brian Dang use them I’m going to explore them some more.&lt;/p&gt;
&lt;h3 id="update"&gt;Update
&lt;/h3&gt;&lt;p&gt;Thanks to &lt;a class="link" href="https://twitter.com/8bitclassroom" target="_blank" rel="noopener"
 &gt;Brian Dang&lt;/a&gt; for giving me a tidier version of the calculation using nested WITH functions. So the calculation inside the component is now:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; CalcValue: Mod(DECtoHEX.DEC,16)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; With(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; FirstBit: (DECtoHEX.DEC-CalcValue)/16,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; SecondBit: CalcValue
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; If(FirstBit&amp;gt;9,Char(55+FirstBit),FirstBit) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; If(SecondBit&amp;gt;9,Char(55+SecondBit),SecondBit)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="more-power-apps-posts"&gt;More Power Apps Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-transparency-update/" target="_blank" rel="noopener"
 &gt;Transparency Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/" target="_blank" rel="noopener"
 &gt;Using JSON Feature to Save Pictures&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-object-detect-model/" target="_blank" rel="noopener"
 &gt;AI Builder Object Detect Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-function-component/" target="_blank" rel="noopener"
 &gt;Function Component&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;SVG in Power Apps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-12-days-of-components/" target="_blank" rel="noopener"
 &gt;12 Days of Components&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Build a Responsive App series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/" target="_blank" rel="noopener"
 &gt;Embed a Power BI Chart&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>PowerApps – SVG Introduction</title><link>https://hatfullofdata.blog/powerapps-svg-introduction/</link><pubDate>Fri, 25 Oct 2019 08:23:17 +0000</pubDate><guid>https://hatfullofdata.blog/powerapps-svg-introduction/</guid><description>&lt;p&gt;This is the first post in the PowerApps SVG series. In this SVG Introduction post we will cover adding a simple SVG drawing to a PowerApp screen. Future posts will show how to manipulate that image.&lt;/p&gt;
&lt;h3 id="series"&gt;Series
&lt;/h3&gt;&lt;p&gt;This series is to introduce ideas for using SVG within PowerApps to add graphics to your Apps.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;Introduction to SVG in a PowerApp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-animating-svg-fill-colour-and-size/" target="_blank" rel="noopener"
 &gt;Animating SVG colours and sizes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Multi-part SVGs&lt;/li&gt;
&lt;li&gt;Rotation and Clip Paths&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="svg-introduction"&gt;SVG Introduction
&lt;/h3&gt;&lt;p&gt;SVG stands for Scalable Vector Graphics and is a language to define a drawing. The drawings are defined by co-ordinates and dimensions which means they can be stretched without loosing definition.&lt;/p&gt;
&lt;p&gt;I am not going to give a full introduction to SVG here in this post. I recommend you look at my intro SVG post at &lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-1/" target="_blank" rel="noopener"
 &gt;https://hatfullofdata.blog/svg-in-power-bi-part-1/&lt;/a&gt; for resources and a brief overview.&lt;/p&gt;
&lt;h3 id="using-svg-in-a-powerapp"&gt;Using SVG in a PowerApp
&lt;/h3&gt;&lt;p&gt;Given the resources in the post above we can write a very simple SVG statement that would work on a web page with the following code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The above code draws a circle filled in with red. It is centered in the drawing area and if the area is 100px its radius will 40px, and if expanded to to 400px square the radius will expand to 160px.&lt;/p&gt;
&lt;p&gt;In order to use the above code we need to do two things, firstly encode the code using the function EncodeUrl and then add a string onto the front stating the format of the image data. So the above code becomes&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;#34;data:image/svg+xml;utf8, &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; EncodeUrl(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;We use the above code by adding an image control to the app and replacing SampleImage with the above code.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding SVG code" class="gallery-image" data-flex-basis="403px" data-flex-grow="168" height="404" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-svg-introduction/SVG_101.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The image can be re-sized and moved and it will remain a sharp red circle.&lt;/p&gt;
&lt;h3 id="more-complex-svg-images"&gt;More Complex SVG images.
&lt;/h3&gt;&lt;p&gt;The above example is a very simple red circle. SVG is a complex language that can define very detailed shapes using paths. You can search online or use latest version of Microsoft Office’s Icons saved to disk to get SVG images. For this example I’m going to draw an owl. I saved an icon from PowerPoint as a picture to create this one but I could have found one on the internet.&lt;/p&gt;
&lt;p&gt;When I open the SVG in a text editor I can see I have similar top part and bottom parts and and between them multiple paths and other drawing elements. I have replaced all double quotes ” with single quotes ‘.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Owl SVG" class="gallery-image" data-flex-basis="788px" data-flex-grow="328" height="207" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-svg-introduction/SVG_102-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In order to keep my image code simple I am creating a variable, vvSVGOwl, to store the SVG, in the start code of the app.&lt;/p&gt;
&lt;p&gt;&lt;img alt="saving SVG to variable" class="gallery-image" data-flex-basis="1026px" data-flex-grow="427" height="159" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-svg-introduction/SVG_103.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We can then use the variable in an image to draw the owl in the app. (Remember to execute your start code, I always forget!)&lt;/p&gt;
&lt;p&gt;&lt;img alt="owl in the app" class="gallery-image" data-flex-basis="385px" data-flex-grow="160" height="423" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-svg-introduction/SVG_104.png" width="679"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;This post is a quick SVG introduction for PowerApps. Due to the SVG code being flexible and including lots of other options the possibilities for using SVG are endless.&lt;/p&gt;
&lt;h2 id="more-power-apps-posts"&gt;More Power Apps Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-transparency-update/" target="_blank" rel="noopener"
 &gt;Transparency Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/" target="_blank" rel="noopener"
 &gt;Using JSON Feature to Save Pictures&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-object-detect-model/" target="_blank" rel="noopener"
 &gt;AI Builder Object Detect Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-function-component/" target="_blank" rel="noopener"
 &gt;Function Component&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;SVG in Power Apps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-12-days-of-components/" target="_blank" rel="noopener"
 &gt;12 Days of Components&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Build a Responsive App series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/" target="_blank" rel="noopener"
 &gt;Embed a Power BI Chart&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query Functions – SQL Procedures</title><link>https://hatfullofdata.blog/power-query-execute-sql-procedure/</link><pubDate>Sun, 06 Oct 2019 17:25:02 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-execute-sql-procedure/</guid><description>&lt;p&gt;This is the fourth post in my series regarding writing custom functions in Power Query. This post describes how to create a function that will execute an SQL procedure, passing in a parameter.&lt;/p&gt;
&lt;p&gt;This series is to support my sessions at Data Relay 2019 and will cover the topics in the session.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Handwritten Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Functions and Parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fetch-web-data/" target="_blank" rel="noopener"
 &gt;Using functions to fetch web data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-function-to-execute-a-procedure/" target="_blank" rel="noopener"
 &gt;Executing SQL procedures from functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="stored-procedure"&gt;Stored Procedure
&lt;/h3&gt;&lt;p&gt;My database contains a very simple procedure that given a cost center returns all the expense records.&lt;/p&gt;
&lt;p&gt;&lt;img alt="stored procedure" class="gallery-image" data-flex-basis="886px" data-flex-grow="369" height="184" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_401.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;It can be run with the following SQL&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;EXECUTE dbo.GetExpenses @CostCenter=&amp;#34;B01&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="create-initial-query"&gt;Create Initial Query
&lt;/h3&gt;&lt;p&gt;The initial query will excute a procedure with a fixed parameter being passed to the procedure using the SQL in the previous section.&lt;/p&gt;
&lt;p&gt;Add a new source of SQL Server. Fill in the Server and Database and then click on Advanced options to reveal the SQL statement box where you enter the SQL statement to execute the procedure.&lt;/p&gt;
&lt;p&gt;&lt;img alt="entering in SQL procedure statement" class="gallery-image" data-flex-basis="232px" data-flex-grow="96" height="703" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_402.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click OK to and then Transform Data to edit the query. When the query opens it has only one step called Source.&lt;/p&gt;
&lt;h3 id="create-parameter-and-function"&gt;Create Parameter and Function
&lt;/h3&gt;&lt;p&gt;After creating the query, we need to create a parameter to store the value to pass into the procedure. So from the Home ribbon tab select Manage Parameters – New Parameter. You need to give the parameter a name and the type Text and lastly a value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Creating parameter" class="gallery-image" data-flex-basis="291px" data-flex-grow="121" height="559" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_403.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then we need to edit the Source step of the query to use the above parameter. Remember to get the number of ” correct, you need 2 ” if the ” is inside a string.&lt;/p&gt;
&lt;p&gt;&lt;img alt="inserting parameter" class="gallery-image" data-flex-basis="761px" data-flex-grow="317" height="214" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_404-1.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;When you alter the query you might get a prompt asking for permission to run the query. For now let it run the query, further on in this post I will discuss this further.&lt;/p&gt;
&lt;p&gt;After we have included the parameter into the query it is ready to be converted into a function, just as we have done in previous posts. Right click on the query and select Create Function, then enter in a name for the function. As before the query and parameter get moved into a group with the new function.&lt;/p&gt;
&lt;p&gt;&lt;img alt="function group" class="gallery-image" data-flex-basis="309px" data-flex-grow="128" height="392" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_405.png" width="505"&gt;&lt;/p&gt;
&lt;p&gt;This function can now be invoked on a table of cost centers to give all the related expenses.&lt;/p&gt;
&lt;p&gt;&lt;img alt="cost center table" class="gallery-image" data-flex-basis="391px" data-flex-grow="163" height="273" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_409.png" width="445"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="expanded to expenses" class="gallery-image" data-flex-basis="872px" data-flex-grow="363" height="187" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_410.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="changing-security"&gt;Changing Security
&lt;/h3&gt;&lt;p&gt;When you invoke the query you will get a prompt asking for permission to run a native database query. This is a caution to warn you that some SQL is being run which could makes changes to the database.&lt;/p&gt;
&lt;p&gt;&lt;img alt="permission is required" class="gallery-image" data-flex-basis="1457px" data-flex-grow="607" height="112" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_406.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you click on Edit Permission you will be shown the SQL that is going to be executed, so you can check it carefully.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Native Database Query" class="gallery-image" data-flex-basis="329px" data-flex-grow="137" height="495" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_408.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This request for permission can be turned off. Click on File and then Options, and then Security. The first option in the dialog is regarding Native Database Queries, by default the require approval is ticked. Be aware this changes it for all queries.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Turn off requiring approval" class="gallery-image" data-flex-basis="236px" data-flex-grow="98" height="691" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-execute-sql-procedure/customfunc_407.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;SQL procedures are a great way to make use of the dba to build the queries you need to fetch the data using your parameters. Obviously this will require many biscuits for the dba. I think there is plenty of scope for functions that execute an SQL procedure.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;I am not the first, and hopefully not the last to write blog posts on writing functions in M for Power Query. Here are a list of the resources I found useful. (If you know of any good ones I’ve missed please let me know!)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/2016/05/15/creating-m-functions-from-parameterised-queries-in-power-bi/" target="_blank" rel="noopener"
 &gt;Chris Webb’s Creating M Functions From Parameterised Queries In Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://skillsmatter.com/skillscasts/10210-working-with-parameters-and-functions-in-power-query-excel-and-power-bi" target="_blank" rel="noopener"
 &gt;Chris Webb presenting at Skills Matter on Working with Parameters and Functions in Power Query/Excel and Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://ssbi-blog.de/writing-documentation-for-custom-m-functions/" target="_blank" rel="noopener"
 &gt;Lars Schreiber’s Writing documentation for custom M-functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://bengribaudo.com/blog/2017/11/17/4107/power-query-m-primer-part1-introduction-simple-expressions-let" target="_blank" rel="noopener"
 &gt;Ben Gribaudo’s Power Query M Primer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query Functions – Fetch web data</title><link>https://hatfullofdata.blog/power-query-fetch-web-data/</link><pubDate>Sat, 05 Oct 2019 17:33:54 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-fetch-web-data/</guid><description>&lt;p&gt;This is the third post in my Custom functions in Power Query series. Often web based data is split across multiple pages using the url to select the data. This post describes how to build a function that populates the parts of the url so multiple pages can be used to fetch web data can be combined.&lt;/p&gt;
&lt;p&gt;This series is to support my sessions at Data Relay 2019 and will cover the topics in the session.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Handwritten Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Functions and Parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fetch-web-data/" target="_blank" rel="noopener"
 &gt;Using functions to fetch web data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-function-to-execute-a-procedure/" target="_blank" rel="noopener"
 &gt;Executing SQL procedures from functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="initial-query-to-fetch-web-data"&gt;Initial Query to Fetch Web Data
&lt;/h3&gt;&lt;p&gt;We start the whole process by fetching data from one page of the web site. for my example in this post I am going to use data from Formula 1 racing. The page I am using as my initial page if for the first race in 2019 in Australia. The url is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://www.formula1.com/en/results.html/2019/races/1000/australia/race-result.html
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Web page" class="gallery-image" data-flex-basis="413px" data-flex-grow="172" height="395" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_301.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I’ve used table by example to extract the data I need. (There is a blog post coming cover table by example.) So I end up with three step query.&lt;/p&gt;
&lt;p&gt;&lt;img alt="3 step query to fetch web data" class="gallery-image" data-flex-basis="766px" data-flex-grow="319" height="213" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_302.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-first-parameter-to-web-query"&gt;Adding First Parameter to Web Query
&lt;/h3&gt;&lt;p&gt;The next step is to replace parts of the url with parameters in the Source step. If we look at the url it has three parts that could be made into parameters. The Race Year, Race Number and Race Name. For the the first race in 2019 the values would be :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;RaceYear – 2019&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RaceNumber – 1000&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RaceName – Australia&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first parameter needs to be created before you change the Source step. From the Home ribbon tab, select Manage Parameters, New Parameter. Then you need to enter in a name for the parameter, a type of text and the current value. The type has to be text for the parameter to get included in the next step. Finally click OK to create the parameter.&lt;/p&gt;
&lt;p&gt;&lt;img alt="creating first parameter" class="gallery-image" data-flex-basis="299px" data-flex-grow="124" height="545" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_303-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Now we can start to change the source step in the query. Start by clicking on the cog wheel of the Source step which will open a dialog. Then click on Advanced to give the option to break the URL into parts. You can click on Add Part to add extra rows. The first drop down allows offers Text or Parameter. If you don’t get the drop down on the left it means you don’t have any text parameters.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding first parameter to source" class="gallery-image" data-flex-basis="380px" data-flex-grow="158" height="429" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_304.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-extra-parameters"&gt;Adding Extra Parameters
&lt;/h3&gt;&lt;p&gt;Earlier I stated that the url had three parts that could be put into parameters. We can create and add the new parameters inside the From Web dialog. Click Add Part to add a new row. From the new drop down select New Parameter and enter in the details of your new parameter, remember they need to be text.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding more parameters" class="gallery-image" data-flex-basis="318px" data-flex-grow="132" height="513" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_305.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you have finished adding new parameter and breaking the url up, click OK to save your changes. Check you still get the correct data from your query.&lt;/p&gt;
&lt;h3 id="creating-function-from-query"&gt;Creating Function from Query
&lt;/h3&gt;&lt;p&gt;We now have a query that can fetch web data which we now need to use to build a function from it..&lt;/p&gt;
&lt;p&gt;Right click on your query and select Create Function. Type in a name for the query.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="608px" data-flex-grow="253" height="268" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_306.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The query and the parameters are all moved into a group and a function is created. If any changes are required in the function, the changes need to be made to the query. If changes are made to the function it will break the link with the query.&lt;/p&gt;
&lt;p&gt;&lt;img alt="newly created function" class="gallery-image" data-flex-basis="652px" data-flex-grow="272" height="250" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_307.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="fetch-web-data-from-multiple-pages"&gt;Fetch web data from Multiple pages
&lt;/h3&gt;&lt;p&gt;I have a list of races with year, number and name in an Excel file which I load into a new query. In order for the function to work the RaceYear and RaceNumber columns need to be text.&lt;/p&gt;
&lt;p&gt;&lt;img alt="race data" class="gallery-image" data-flex-basis="336px" data-flex-grow="140" height="485" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_308.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;From the Add Column click Invoke Function. Type in a New column name and select the function in the drop. Then the parameters for the function will appear. Change the first drop down for each parameter to Column Name and select the column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="invoke function" class="gallery-image" data-flex-basis="420px" data-flex-grow="175" height="388" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_309.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you click the OK button the function will run for every row of the table. This will create a column that contains tables. Click on the icon in the top right of the new column. In the dialog box that appears it will show the columns in the table. I un-ticked the Use original column name as prefix to keep the column names short,&lt;/p&gt;
&lt;p&gt;&lt;img alt="expand table column" class="gallery-image" data-flex-basis="580px" data-flex-grow="241" height="281" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_311.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After OK is clicked the column of tables is replaced by the three columns from the table.&lt;/p&gt;
&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="1157px" data-flex-grow="482" height="141" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-fetch-web-data/customfunc_310.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;If your data is web based this provides an efficient method of fetching web data into one table only using a few queries and a function.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;I am not the first, and hopefully not the last to write blog posts on writing functions in M for Power Query. Here are a list of the resources I found useful. (If you know of any good ones I’ve missed please let me know!)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/2016/05/15/creating-m-functions-from-parameterised-queries-in-power-bi/" target="_blank" rel="noopener"
 &gt;Chris Webb’s Creating M Functions From Parameterised Queries In Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://skillsmatter.com/skillscasts/10210-working-with-parameters-and-functions-in-power-query-excel-and-power-bi" target="_blank" rel="noopener"
 &gt;Chris Webb presenting at Skills Matter on Working with Parameters and Functions in Power Query/Excel and Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://ssbi-blog.de/writing-documentation-for-custom-m-functions/" target="_blank" rel="noopener"
 &gt;Lars Schreiber’s Writing documentation for custom M-functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://bengribaudo.com/blog/2017/11/17/4107/power-query-m-primer-part1-introduction-simple-expressions-let" target="_blank" rel="noopener"
 &gt;Ben Gribaudo’s Power Query M Primer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Multi-step Function</title><link>https://hatfullofdata.blog/power-query-multi-step-function/</link><pubDate>Sun, 29 Sep 2019 17:28:40 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-multi-step-function/</guid><description>&lt;p&gt;This is the second post in my Writing Functions in M series. This post describes how to build a multi-step function in M to allow for a more complex function. We will create a parameter to base the calculations on and then build a function.&lt;/p&gt;
&lt;p&gt;This series is to support my sessions at Data Relay 2019 and will cover the topics in the session.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Handwritten Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Functions and Parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fetch-web-data/" target="_blank" rel="noopener"
 &gt;Using functions to fetch web data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-function-to-execute-a-procedure/" target="_blank" rel="noopener"
 &gt;Executing SQL procedures from functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;In the first post of this series we built a different functions and all of them were a single step calculation. Some functions need to be made up of multiple steps. The example we will use in this example is to calculate the next working day based on Saturday and Sunday being non-working days.&lt;/p&gt;
&lt;p&gt;In simple terms the calculation is simple, if today is a Friday add 3 days, Saturday add 2 days, otherwise just add one day. I realise this could be done with a nested if, I’m using this example as a nice easy one to walk through.&lt;/p&gt;
&lt;h3 id="creating-a-parameter"&gt;Creating a Parameter
&lt;/h3&gt;&lt;p&gt;In order to make writing functions easier we create parameters to store the values passed into our multi-step function. This function will only require a single parameter to store the date which we want to calculate the next working day.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Select New Parameter" class="gallery-image" data-flex-basis="476px" data-flex-grow="198" height="342" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_205.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;From the Home ribbon tab, select Manage Parameters and the New Parameter. Then enter in a name for the parameter, e.g. ThisDate and select a Type, e.g. Date. Finally add in a Current Value and press OK.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Setting up parameter" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="544" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_206.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="calculation-steps"&gt;Calculation Steps
&lt;/h3&gt;&lt;p&gt;Now we can start creating the function in with a blank query which I have renamed to NextWorkDay. This first step I am going to make equal to the parameter we created, ThisDate. (Remember the = , I have forgotten it too many times)&lt;/p&gt;
&lt;p&gt;&lt;img alt="Using parameter in the step" class="gallery-image" data-flex-basis="735px" data-flex-grow="306" height="222" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_201-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The first calculation step I am going to add is to calculate the day of the week of the given date. This can be done from the ribbon tab DateTime Tools. Select Date – Day – Day of Week and a new step gets added using the function Date.DayOfWeek.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Using ribbon to add new step." class="gallery-image" data-flex-basis="283px" data-flex-grow="118" height="575" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_202.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Rename the step just added to something shorter, e.g. WeekDay.&lt;/p&gt;
&lt;p&gt;The next step will be to calculate how many days to add to the date. You can add a new step by clicking on the fx next to the formula bar.&lt;/p&gt;
&lt;p&gt;We use an If statement based on the previous step. There is no quick way to add this so you will need to type in formula. The editor does now have intellisense so you should get some assistance in typing in names.&lt;/p&gt;
&lt;p&gt;&lt;img alt="intellisense in action" class="gallery-image" data-flex-basis="1174px" data-flex-grow="489" height="139" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_203.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Using the logic described in the second paragraph of the introduction the complete formula is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= if WeekDay=4 then 3 else 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; if WeekDay=5 then 2 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; else 1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And I rename the step to be DaysToAdd to make the next step easier and it should return 1,2 or 3. You can click on any step and see the result, for example clicking on Source gives you the date.&lt;/p&gt;
&lt;p&gt;So the final step is to use Source and DaysToAdd to calculate the next working day. We use the function Date.AddDays which requires 2 parameters, a date which is Source and the number of days to add which is DaysToAdd.&lt;/p&gt;
&lt;p&gt;&lt;img alt="FInal calculation step AddDays\n" class="gallery-image" data-flex-basis="562px" data-flex-grow="234" height="290" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_204.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;We can change the date in the parameter ThisDate to test different dates and check the calculation logic. Now we are ready to convert this to function.&lt;/p&gt;
&lt;h3 id="creating-the-multi-step-function"&gt;Creating the Multi-step Function
&lt;/h3&gt;&lt;p&gt;Power Query includes a quick method to convert a query that uses a parameter into a function.&lt;/p&gt;
&lt;p&gt;Right click on the NextWorkDay function and from the menu select Create Function. Enter in a name for the function in the Create Function dialog and press OK.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Create function" class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="275" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_207.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This will move both NextWorkDay query and ThisDate parameter into a separate group with the new function. If you want to edit the function you need to edit NextWorkDay and it will update the function fnNextWorkDay. You can edit the function directly but it will break the connection with NextWorkDay so debugging will be harder and is not recommended.&lt;/p&gt;
&lt;h3 id="using-your-multi-step-function"&gt;Using your Multi-step Function
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Final Function" class="gallery-image" data-flex-basis="832px" data-flex-grow="346" height="196" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_208.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The function can now be used in any query in your report by clicking Invoke Custom Column from the Add Column ribbon.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Invoking the multi-step function" class="gallery-image" data-flex-basis="540px" data-flex-grow="225" height="302" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_209.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="final result" class="gallery-image" data-flex-basis="471px" data-flex-grow="196" height="346" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-multi-step-function/customfunc_210.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;The quick Create Function ability makes creating and editing the functions much easier. It makes building functions worth doing and not a huge development process.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;I am not the first, and hopefully not the last to write blog posts on writing functions in M for Power Query. Here are a list of the resources I found useful. (If you know of any good ones I’ve missed please let me know!)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/2016/05/15/creating-m-functions-from-parameterised-queries-in-power-bi/" target="_blank" rel="noopener"
 &gt;Chris Webb’s Creating M Functions From Parameterised Queries In Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://skillsmatter.com/skillscasts/10210-working-with-parameters-and-functions-in-power-query-excel-and-power-bi" target="_blank" rel="noopener"
 &gt;Chris Webb presenting at Skills Matter on Working with Parameters and Functions in Power Query/Excel and Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://ssbi-blog.de/writing-documentation-for-custom-m-functions/" target="_blank" rel="noopener"
 &gt;Lars Schreiber’s Writing documentation for custom M-functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://bengribaudo.com/blog/2017/11/17/4107/power-query-m-primer-part1-introduction-simple-expressions-let" target="_blank" rel="noopener"
 &gt;Ben Gribaudo’s Power Query M Primer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query – Custom Handwritten Function</title><link>https://hatfullofdata.blog/power-query-handwritten-function/</link><pubDate>Fri, 27 Sep 2019 17:50:43 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-handwritten-function/</guid><description>&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;In this post I will write a simple custom handwritten function to perform a calculation based off a parameter. We will then expand that function to include data types and optional parameters.&lt;/p&gt;
&lt;p&gt;For those who are new to programming a function is a piece of code that returns some data, which could be a single value, record or table of data. If you ever need to duplicate a calculation more that twice then it is worth considering writing a function.&lt;/p&gt;
&lt;p&gt;This series is to support my sessions at Data Relay 2019 and will cover the topics in the session.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-handwritten-function/" target="_blank" rel="noopener"
 &gt;Handwritten Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-multi-step-function/" target="_blank" rel="noopener"
 &gt;Multi-step Functions and Parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-fetch-web-data/" target="_blank" rel="noopener"
 &gt;Using functions to fetch web data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-function-to-execute-a-procedure/" target="_blank" rel="noopener"
 &gt;Executing SQL procedures from functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="the-hello-world-function"&gt;The Hello World function
&lt;/h3&gt;&lt;p&gt;Every programming 101 course includes some sort of Hello World function as the introduction. I would hate to break tradition.&lt;/p&gt;
&lt;p&gt;In Power Query we add a Blank Query and we get a blank formula bar. Enter in the following code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= () =&amp;gt; &amp;#34;Hello World&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;When you press return the blank query will be converted into a custom function. It gains an fx in the Queries list. It can be renamed in the Query Settings just like a query.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Hello World Function definition" class="gallery-image" data-flex-basis="872px" data-flex-grow="363" height="187" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_101.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The function can then be used to create a column in a table. From the Add Column ribbon tab, click Invoke Custom Function. Enter in a name for the new column and select the new function from the list.&lt;/p&gt;
&lt;p&gt;&lt;img alt="invoking Hello World function" class="gallery-image" data-flex-basis="587px" data-flex-grow="244" height="278" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_102.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This will add a column to your data. This example is a pretty useless example of just Hello World but tradition has been done and we are now ready to move to the next stage.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data with Hello World column added" class="gallery-image" data-flex-basis="712px" data-flex-grow="296" height="229" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_103.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-a-parameter-to-our-handwritten-function"&gt;Adding a parameter to our Handwritten Function
&lt;/h3&gt;&lt;p&gt;The Hello World function just returned one value, which has a very limited use. So now we will add a parameter to our function and use that value to change our result to include that message.&lt;/p&gt;
&lt;p&gt;Parameter definitions go between the brackets in the definition. I’ve updated the function to be this code and on pressing return will now have details of the parameter required.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= (GuestName) =&amp;gt; &amp;#34;Hello &amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; GuestName
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Hello function with parameter" class="gallery-image" data-flex-basis="473px" data-flex-grow="197" height="345" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_104.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If the function is being used anywhere you will need to modify the function. You can either remove and re-add the function or click the cog wheel on the relevant step. There are two possible windows you will get on clicking the cog wheel.&lt;/p&gt;
&lt;p&gt;&lt;img alt="invoke handwritten function" class="gallery-image" data-flex-basis="542px" data-flex-grow="225" height="301" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_105.png" width="680"&gt;Editing a working custom function column&lt;/p&gt;
&lt;p&gt;&lt;img alt="edit function" class="gallery-image" data-flex-basis="381px" data-flex-grow="158" height="428" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_106.png" width="680"&gt;Editing a custom function column that returns an error&lt;/p&gt;
&lt;p&gt;Your table will now show the result of your updated handwritten function.&lt;/p&gt;
&lt;p&gt;&lt;img alt="results" class="gallery-image" data-flex-basis="803px" data-flex-grow="334" height="203" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_107.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="data-types"&gt;Data Types
&lt;/h3&gt;&lt;p&gt;I can feel my degree lectures turning in their graves as the above function has no data types specified. You can find many online references as to why adding data types into code is good practice, for this post please accept it is good practice and good practice usually leads to cleaner and faster code.&lt;/p&gt;
&lt;p&gt;The fnHelloWorld has a parameter that is text and it returns some text. So we can adjust the code with “as text” after the GuestName parameter and also after the ). It won’t change the function much but it will in the long term be a great habit to adopt.&lt;/p&gt;
&lt;p&gt;&lt;img alt="data types added" class="gallery-image" data-flex-basis="547px" data-flex-grow="228" height="298" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_108.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="quick-look-at-if"&gt;Quick Look at If
&lt;/h3&gt;&lt;p&gt;One of the most used constructs in programming in any language must be the if statement. In order to help you build quick easy functions it is worth noting the syntax.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;if [TEST] then [TRUE RESULT] else [FALSE RESULT]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;So here is a very simple example of a function that calculates a delivery cost based on if the value is over 100 the delivery is free.&lt;/p&gt;
&lt;p&gt;&lt;img alt="simple if statement in an if function\n" class="gallery-image" data-flex-basis="735px" data-flex-grow="306" height="222" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_109.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="optional-parameters"&gt;Optional Parameters
&lt;/h3&gt;&lt;p&gt;Last topic in this post is to make parameter optional and handling when it is not provided. Optional parameters must be the last parameters defined in your function.&lt;/p&gt;
&lt;p&gt;So in my example I’m going to add a column that calculates tax based on the value and the optional tax rate. If no tax rate is given 20% is assumed.&lt;/p&gt;
&lt;p&gt;The parameters have to be withoutTax value followed by taxRate as the taxRate is optional. We can test for no taxRate being given by testing for taxRate = null. So our function is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;= (withoutTax as number, optional taxRate as number) as number =&amp;gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; if taxRate = null then 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; withoutTax * 0.1 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; else 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; withoutTax * taxRate
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="picture of function definition" class="gallery-image" data-flex-basis="514px" data-flex-grow="214" height="317" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_110.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Adding a tax column to example data shows how Alex’s tax rate is null so the tax is calculated at 10% and Jo’s tax is calculated at the given rate of 20%.&lt;/p&gt;
&lt;p&gt;&lt;img alt="data showing tax calculation" class="gallery-image" data-flex-basis="868px" data-flex-grow="361" height="188" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-handwritten-function/customfunc_111.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion-on-handwritten-functions"&gt;Conclusion on Handwritten Functions
&lt;/h3&gt;&lt;p&gt;These are very simple examples of functions but even these can save hours of repeating calculations. When your data has the same cleanup calculations being done to your data over many queries this allows for one function to be used repeatably.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources
&lt;/h3&gt;&lt;p&gt;I am not the first, and hopefully not the last to write blog posts on writing functions in M for Power Query. Here are a list of the resources I found useful. (If you know of any good ones I’ve missed please let me know!)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://blog.crossjoin.co.uk/2016/05/15/creating-m-functions-from-parameterised-queries-in-power-bi/" target="_blank" rel="noopener"
 &gt;Chris Webb’s Creating M Functions From Parameterised Queries In Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://skillsmatter.com/skillscasts/10210-working-with-parameters-and-functions-in-power-query-excel-and-power-bi" target="_blank" rel="noopener"
 &gt;Chris Webb presenting at Skills Matter on Working with Parameters and Functions in Power Query/Excel and Power BI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://ssbi-blog.de/writing-documentation-for-custom-m-functions/" target="_blank" rel="noopener"
 &gt;Lars Schreiber’s Writing documentation for custom M-functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://bengribaudo.com/blog/2017/11/17/4107/power-query-m-primer-part1-introduction-simple-expressions-let" target="_blank" rel="noopener"
 &gt;Ben Gribaudo’s Power Query M Primer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Power Query in Flow – Summarising the Data</title><link>https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/</link><pubDate>Mon, 23 Sep 2019 08:33:01 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/</guid><description>&lt;p&gt;This is the third post in my series regarding Power Query in Flow. In this post I will look at the different options we have for summarising the data using grouping and pivoting with Power Query.&lt;/p&gt;
&lt;p&gt;Here is a list of all the posts in the series so far.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/" target="_blank" rel="noopener"
 &gt;Introducing Power Query in Microsoft Flow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-microsoft-flow-2/" target="_blank" rel="noopener"
 &gt;Joining tables of data in Flow’s Power Query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-flow-3/" target="_blank" rel="noopener"
 &gt;Summarising Data in Flow’s Power Query&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;Again this post might be redundant if you’ve followed my advice and found out your dba’s favourite biscuits and got them to write you some awesome views in the database.&lt;/p&gt;
&lt;p&gt;For those that haven’t got access to the dba lets look at how we can summarise the data. We will look at two different types of summarising the data, firstly grouping and then pivoting. I have assumed you’ve got your data into a simple table using merges etc.&lt;/p&gt;
&lt;h3 id="using-grouping"&gt;Using Grouping
&lt;/h3&gt;&lt;p&gt;In this example we will group by a column and include some summary values. We will group by Product and then summary values of count of orders, total quantity and total value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Initial data" class="gallery-image" data-flex-basis="279px" data-flex-grow="116" height="584" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_201.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;This is how the data starts.&lt;/p&gt;
&lt;p&gt;On the toolbar click Transform Table and select Group By. We will start with a basic grouping of just one column to group by and one summary column of Order Count.&lt;/p&gt;
&lt;p&gt;I selected ProdName for the group by , entered a name for the summary column to give Order Count by counting the rows.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Basic Group by dialog" class="gallery-image" data-flex-basis="528px" data-flex-grow="220" height="309" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_202.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Simple group" class="gallery-image" data-flex-basis="352px" data-flex-grow="146" height="353" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_203.png" width="518"&gt;&lt;/p&gt;
&lt;p&gt;To add more columns to the summary I click on the cog wheel on the Grouped rows step to re-open the group by dialog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Group by dialog" class="gallery-image" data-flex-basis="367px" data-flex-grow="153" height="444" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_204.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I click on Advanced to open up options to add extra grouping and aggregation options. I click on Add aggregation to add extra columns and change Operation to Sum and Column to total up Qty and Value. Clicking OK updates the table.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Data grouped" class="gallery-image" data-flex-basis="626px" data-flex-grow="261" height="260" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_205.png" width="679"&gt;&lt;/p&gt;
&lt;h3 id="using-pivoting"&gt;Using Pivoting
&lt;/h3&gt;&lt;p&gt;Pivoting is a form of grouping that splits the data across a number of columns, for example total sales for each product across hours of the day. The first step is to reduce your table into just the data you need. So include the data for each row title, one set of data to be the column headings and one to be the data summarised.&lt;/p&gt;
&lt;p&gt;So I do Select Columns to reduce down to just Product, Hour of Sale and Qty of items sold.&lt;/p&gt;
&lt;p&gt;&lt;img alt="data ready to pivot" class="gallery-image" data-flex-basis="308px" data-flex-grow="128" height="482" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_206.png" width="620"&gt;&lt;/p&gt;
&lt;p&gt;Next, select the column of data that will make the column headings in your pivot. In my example I select the SaleHour column. Then from Transform Column, select Pivot Column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="pivot column dialog" class="gallery-image" data-flex-basis="480px" data-flex-grow="200" height="340" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_207.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the Pivot column dialog, click on Advanced to reveal more options. In the Value column select the value you want to summarise and select the function you to use. Click OK to pivot the data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="final pivot table after summarising the data" class="gallery-image" data-flex-basis="943px" data-flex-grow="393" height="173" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-flow-summarising-the-data/Flow-PQ_208.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Power Query provides a powerful way for summarising the data ready to process within the flow. As I stated earlier a view written by a dba would be more useful and quicker.&lt;/p&gt;</description></item><item><title>AI Builder Object Detect Model with Power Automate and Power Apps</title><link>https://hatfullofdata.blog/ai-builder-object-detect-model/</link><pubDate>Mon, 09 Sep 2019 09:38:06 +0000</pubDate><guid>https://hatfullofdata.blog/ai-builder-object-detect-model/</guid><description>&lt;p&gt;This series of posts is to introduce using an AI Builder Object detect model with Power Automate to get and save predictions and then display these predictions over the images in a Power App.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-with-flow-and-power-apps-building-the-model/" target="_blank" rel="noopener"
 &gt;Build the Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save Predictions&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use Predictions in a PowerApp&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;In this post I will document building an AI Builder object detect model. We will create the list of items to detect, upload images, identify each image and then train and publish the model. I will be using 2 different types of Lego bricks, 1×2 block and 2×2 block.&lt;/p&gt;
&lt;p&gt;This post will be split into multiple parts&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create Entity to store object names&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create Model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upload and Tag images&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Train Model&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="create-entity-to-store-object-names"&gt;Create Entity to store object names
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Create Entity" class="gallery-image" data-flex-basis="122px" data-flex-grow="51" height="1024" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-001.png" width="523"&gt;&lt;/p&gt;
&lt;p&gt;Before we can start building model we need to create a list of object names stored in the Common Data Store (CDS) in an entity. We need to create the entity and load object names.&lt;/p&gt;
&lt;p&gt;We start in Flow.Microsoft.com and then on the left hand menu click Data and then Entities.&lt;/p&gt;
&lt;p&gt;From the top ribbon select New entity which will open a pane on the right hand side. Enter a Display Name for the entity. It will complete the other fields for you.&lt;/p&gt;
&lt;p&gt;Click Create to create the entity.&lt;/p&gt;
&lt;p&gt;The next stage is to add data to the entity. The easiest way to do this is via Excel. Click on the Edit Data in Excel. A file will be downloaded which you need to open in Excel.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Entity screen" class="gallery-image" data-flex-basis="925px" data-flex-grow="385" height="176" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-002.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;You might need to enable the feature to get the pane to the feature in Excel. Enter in the Object Names and then click Publish to save the values to your entity.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Edit entity in Excel" class="gallery-image" data-flex-basis="477px" data-flex-grow="198" height="342" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-003.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once the values have been published you can check back in your entity by back on the website and clicking on Data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Show entity data" class="gallery-image" data-flex-basis="794px" data-flex-grow="331" height="205" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-004.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;If Excel won’t play ball, and for one client it just won’t, then you can use a very simple flow to add the entries.&lt;/p&gt;
&lt;h3 id="create-the-ai-builder-object-detect-model"&gt;Create the AI Builder Object Detect Model
&lt;/h3&gt;&lt;p&gt;On the left hand menu select AI Builder and then Build. The AI Builder currently offers 4 types of model. For this post we are going to build an Object detection model, so click on Object Detection. Then enter a name for your model and click Create.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Create the model" class="gallery-image" data-flex-basis="735px" data-flex-grow="306" height="222" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-005.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Name the model" class="gallery-image" data-flex-basis="346px" data-flex-grow="144" height="471" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-006.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="select-object-names"&gt;Select Object Names
&lt;/h3&gt;&lt;p&gt;The next stage in building the model, is to select the names to be used in the model. Click on select object names. From the panel select the entity you created and tick the Name column and click Select Fields.&lt;/p&gt;
&lt;p&gt;On the next screen select the values and click Next.&lt;/p&gt;
&lt;p&gt;&lt;img alt="pick names to use" class="gallery-image" data-flex-basis="671px" data-flex-grow="279" height="243" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-007.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="add-images"&gt;Add Images
&lt;/h3&gt;&lt;p&gt;After the object names have been selected you then need to add images for the model to be trained from. Click on the Add Images and this will open a file selection window, select files and click Open.&lt;/p&gt;
&lt;p&gt;On the next window it will show all the selected files. Click on Upload to start the upload. When the upload has completed click Close to move onto the next stage.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add images to model" class="gallery-image" data-flex-basis="587px" data-flex-grow="244" height="278" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-008.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next window will show you a summary of your uploads. You can click on +Add Images to add more images to improve your model. You need at least 15 images but more is recommended. Click Next to start tagging your images.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Summary of images in model" class="gallery-image" data-flex-basis="523px" data-flex-grow="217" height="312" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-009.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="tagging-images"&gt;Tagging Images
&lt;/h3&gt;&lt;p&gt;The next stage is tagging the images. I recommend a cup of tea, some music because this takes time.&lt;/p&gt;
&lt;p&gt;Click Next to start the tagging. Thumbnails of the images will be shown. Click on an image to enlarge that image and start the tagging. You can drag a box of an object or it will suggest objects with a white dotted box. Select the tag to apply.&lt;/p&gt;
&lt;p&gt;&lt;img alt="tag images in model" class="gallery-image" data-flex-basis="709px" data-flex-grow="295" height="230" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-010.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="tag objects in pictures in model" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="383" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-011.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;On the right is a summary for this image and on the top ribbon you can choose to not use an image. When you click on the arrow it will move you onto the next image.&lt;/p&gt;
&lt;p&gt;When you have tagged all the images, click on Done Tagging in the top right hand corner.&lt;/p&gt;
&lt;h3 id="train-object-detect-model"&gt;Train Object Detect Model
&lt;/h3&gt;&lt;p&gt;When you click Next you get shown the details of your model so far. Click on the Train button to start the training.&lt;/p&gt;
&lt;p&gt;&lt;img alt="train the model" class="gallery-image" data-flex-basis="386px" data-flex-grow="161" height="422" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-012.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Training takes a while, the above one took 5 minutes to train. I assume its longer when there are more images and more tags. Eventually your list of models will show a time of being trained.&lt;/p&gt;
&lt;p&gt;&lt;img alt="training finished in model" class="gallery-image" data-flex-basis="728px" data-flex-grow="303" height="224" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-013.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The last step is to publish your object detect model. Click on the model name in the model list and it will show you a score for the training and give you a Publish button. Click the button to publish your model ready to use.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Published model" class="gallery-image" data-flex-basis="511px" data-flex-grow="213" height="319" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/ai-builder-object-detect-model/AI-Builder-014.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion-to-object-detect-model"&gt;Conclusion to Object Detect Model
&lt;/h3&gt;&lt;p&gt;This is a new feature still in preview, so it has its clunky parts, but it brings machine learning firmly into the hands of the citizen developer without any Azure bills.&lt;/p&gt;
&lt;p&gt;I really hope in 6 months time I need to write this post again because they’ve added new features and made it slightly less clunky.&lt;/p&gt;
&lt;h2 id="more-power-apps-posts"&gt;More Power Apps Posts
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-transparency-update/" target="_blank" rel="noopener"
 &gt;Transparency Update&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/" target="_blank" rel="noopener"
 &gt;Using JSON Feature to Save Pictures&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/ai-builder-object-detect-model/" target="_blank" rel="noopener"
 &gt;AI Builder Object Detect Model&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-function-component/" target="_blank" rel="noopener"
 &gt;Function Component&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/powerapps-svg-introduction/" target="_blank" rel="noopener"
 &gt;SVG in Power Apps series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-12-days-of-components/" target="_blank" rel="noopener"
 &gt;12 Days of Components&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-build-a-responsive-app-planning/" target="_blank" rel="noopener"
 &gt;Build a Responsive App series&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-apps-embed-a-power-bi-chart/" target="_blank" rel="noopener"
 &gt;Embed a Power BI Chart&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Joining Tables of Data in Flow’s Power Query</title><link>https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/</link><pubDate>Fri, 06 Sep 2019 20:00:01 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/</guid><description>&lt;p&gt;This is the second post in my series regarding Power Query in Flow. In this post I will introduce one of the most powerful parts of Power Query, joining tables. Its the vlookup part of Power Query.&lt;/p&gt;
&lt;p&gt;Here is a list of all the posts in the series so far.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/" target="_blank" rel="noopener"
 &gt;Introducing Power Query in Microsoft Flow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-microsoft-flow-2/" target="_blank" rel="noopener"
 &gt;Joining tables of data in Flow’s Power Query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-flow-3/" target="_blank" rel="noopener"
 &gt;Summarising Data in Flow’s Power Query&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="introduction"&gt;Introduction
&lt;/h3&gt;&lt;p&gt;If you have made best buddy friends with your dba (database administrator) then this post is possibly not required because if your dba will write a view to do the join for you, that is always better. BTW in my experience, dbas like biscuits.&lt;/p&gt;
&lt;p&gt;For those who don’t have access to their dba or haven’t bought enough biscuits this what we are going to do. My database contains a table called productsales.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Table of product sales" class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="275" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_101.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In the Product Sales table is a ProductID column. I am going to use this value to merge in the values from the Product table (i.e. joining tables) so I can get the name and price.&lt;/p&gt;
&lt;p&gt;&lt;img alt="products" class="gallery-image" data-flex-basis="564px" data-flex-grow="235" height="289" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_102.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="multiple-tables"&gt;Multiple Tables
&lt;/h3&gt;&lt;p&gt;We start by adding both tables to our query. If multiple tables are in a query, Power Query only returns one table. You can tell which table will be returned by looking at the list of tables. The tables with italic names will not be returned, therefore the un-italicised table will be returned.&lt;/p&gt;
&lt;p&gt;&lt;img alt="select query to load" class="gallery-image" data-flex-basis="699px" data-flex-grow="291" height="233" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_103.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;Right click on a table name to open the menu. Then select Enable Load to change the table that will be loaded. In this example I will select that productsales will be loaded.&lt;/p&gt;
&lt;h3 id="merging-tables"&gt;Merging tables
&lt;/h3&gt;&lt;p&gt;We want to add the product name and product price to product sales tables. We will do this by merging the two tables.&lt;/p&gt;
&lt;p&gt;Select the productsales table. Then from the toolbar, select Combine Tables and Merge Queries.&lt;/p&gt;
&lt;p&gt;&lt;img alt="merge queries" class="gallery-image" data-flex-basis="269px" data-flex-grow="112" height="360" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_105.png" width="404"&gt;&lt;/p&gt;
&lt;p&gt;In the Merge dialog that appears select table you wish to merge with in the drop down, in my example I select products table. Then click on the columns that match, in my example I select product id in both tables.&lt;/p&gt;
&lt;p&gt;&lt;img alt="merge dialog box" class="gallery-image" data-flex-basis="208px" data-flex-grow="86" height="783" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_104-2.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Leave the join kind as Left Outer as this will keep all the sales records and find matching products. Further details of join types can be found on Radacad’s site. &lt;a class="link" href="https://radacad.com/choose-the-right-merge-join-type-in-power-bi" target="_blank" rel="noopener"
 &gt;https://radacad.com/choose-the-right-merge-join-type-in-power-bi&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="expanding-the-table-column"&gt;Expanding the table column
&lt;/h3&gt;&lt;p&gt;Clicking OK will update the table to include a column which contains Tables.&lt;/p&gt;
&lt;p&gt;&lt;img alt="expand table column" class="gallery-image" data-flex-basis="470px" data-flex-grow="195" height="347" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_106.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Click on the icon in top right of the new column to display the columns available in the tables. Unselect any un-required columns. Unselect the Use original column name as prefix to prevent the new columns being named long names for example products.ProdName. Then click OK to add the new columns.&lt;/p&gt;
&lt;p&gt;&lt;img alt="final data after joining tables" class="gallery-image" data-flex-basis="553px" data-flex-grow="230" height="295" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-joining-tables/Flow-PQ_107.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion-to-joining-tables"&gt;Conclusion to Joining Tables
&lt;/h3&gt;&lt;p&gt;Merging is a powerful addition to transforming data. It is better if a view can added to the database by your dba as that will always be more efficient. Power Query merges do offer a great alternative.&lt;/p&gt;</description></item><item><title>Power Query in Microsoft Flow – An Introduction</title><link>https://hatfullofdata.blog/power-query-in-microsoft-flow-1/</link><pubDate>Mon, 26 Aug 2019 21:34:42 +0000</pubDate><guid>https://hatfullofdata.blog/power-query-in-microsoft-flow-1/</guid><description>&lt;p&gt;This is the first post in a new series regarding Power Query in Microsoft Flow. In this post I will cover the basics of connecting to SQL Server and using Power Query to filter and sort the data and finally add calculated columns.&lt;/p&gt;
&lt;p&gt;This series assumes that you are not a user of Power Query desktop from Excel or Power BI.&lt;/p&gt;
&lt;p&gt;Here is a list of all the posts in the series so far.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/" target="_blank" rel="noopener"
 &gt;Introducing Power Query in Microsoft Flow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-microsoft-flow-2/" target="_blank" rel="noopener"
 &gt;Joining tables of data in Flow’s Power Query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://hatfullofdata.blog/power-query-in-flow-3/" target="_blank" rel="noopener"
 &gt;Summarising Data in Flow’s Power Query&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="introduction-to-power-query-in-microsoft-flow"&gt;Introduction to Power Query in Microsoft Flow
&lt;/h3&gt;&lt;p&gt;In September 2018 Microsoft announced the integration of Power Query Online for Microsoft Flow. The reasons were to offer an alternative to OData and SQL for getting data from SQL Server connector. They included a hint that other data sources will come in the future but no details when or what.&lt;/p&gt;
&lt;p&gt;For those coming from Power Query for Excel or Power BI you need to understand you are currently limited to data stored in SQL Server online or server via a gateway. Also the Power Query Online environment is not as powerful as the desktop app version. It is still written in M, so you can do many of the transformations you can in Excel and Power BI’s Power Query.&lt;/p&gt;
&lt;h3 id="connecting-to-the-database"&gt;Connecting to the Database
&lt;/h3&gt;&lt;p&gt;Our first action is to connect Power Query to the data. Power Query action is from the SQL Server connector.&lt;/p&gt;
&lt;p&gt;&lt;img alt="sql server connection" class="gallery-image" data-flex-basis="462px" data-flex-grow="192" height="353" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_001.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;If this is the first time you’ve connected to the database you will be prompted for database details and the user id to use with a password.&lt;/p&gt;
&lt;p&gt;&lt;img alt="authentication and settings" class="gallery-image" data-flex-basis="292px" data-flex-grow="122" height="557" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_002.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then the action then changes to just show a button. This means you have connected to the database successfully.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Successful connection to power query in microsoft flow" class="gallery-image" data-flex-basis="1255px" data-flex-grow="523" height="130" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_004.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="selecting-data-to-transform"&gt;Selecting Data to Transform
&lt;/h3&gt;&lt;p&gt;When you click the Edit Query button for the first time, you will be presented with the tables and views in the database. You need to tick the tables and views that you need. For this post I’m just going select a single table Expenses and then click Next.&lt;/p&gt;
&lt;p&gt;&lt;img alt="select tables" class="gallery-image" data-flex-basis="457px" data-flex-grow="190" height="357" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_005.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next window is the main Online Power Query window, where we will add steps to transform your data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;List of parameters and tables&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View of the data at the current step&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;List of steps&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Toolbar used to add new steps&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="power query window" class="gallery-image" data-flex-basis="455px" data-flex-grow="189" height="358" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_006.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="filtering-data"&gt;Filtering Data
&lt;/h3&gt;&lt;p&gt;One of the most common requests on data is to filter the values. Clicking on the arrow next to column header will show you a list of values with tick boxes. Un-tick the unrequired values to filter your data. When you do this it will add a new step to the applied steps.&lt;/p&gt;
&lt;p&gt;&lt;img alt="filtering" class="gallery-image" data-flex-basis="439px" data-flex-grow="183" height="371" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_007.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;When you want to change the filtered value, you need to click the cog wheel next to the step. You can click on X to remove any step.&lt;/p&gt;
&lt;h3 id="sorting-data"&gt;Sorting Data
&lt;/h3&gt;&lt;p&gt;When you click the drop down arrow next the column heading, you can select Sort ascending or Sort descending. The first time you select sort, the data gets sorted and a new step is added to the applied steps.&lt;/p&gt;
&lt;p&gt;If you then sort another column, the existing step is just extended to add the next column to the sort. This is similar to adding a new sort level in Excel.&lt;/p&gt;
&lt;p&gt;&lt;img alt="sorting" class="gallery-image" data-flex-basis="1337px" data-flex-grow="557" height="122" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_008.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="adding-columns"&gt;Adding Columns
&lt;/h3&gt;&lt;p&gt;One of the most powerful parts of Power Query is to add columns using calculations. The interface can be really clever and also limited and drives me nuts which is perhaps a blog post all of its own.&lt;/p&gt;
&lt;p&gt;If you select a column and then click Add Column from the top ribbon you will get offered choices based on the column type. For example, if you have selected a number column you get offered Standard, Scientific and Trigonometry functions and rounding plus others.&lt;/p&gt;
&lt;p&gt;&lt;img alt="adding column" class="gallery-image" data-flex-basis="454px" data-flex-grow="189" height="359" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_009.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The result of the calculation is placed in a new column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="column added" class="gallery-image" data-flex-basis="676px" data-flex-grow="281" height="241" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_010.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;When you select multiple columns before selecting Add column, calculations to combine the columns are offered, such as difference between dates.&lt;/p&gt;
&lt;h3 id="renaming-and-selecting-columns"&gt;Renaming and Selecting Columns
&lt;/h3&gt;&lt;p&gt;You can rename any column by double clicking on the column header and typing in a new name. The first column you rename will add a new step to the query. If you rename another column straight after the Renamed Columns step is extended.&lt;/p&gt;
&lt;p&gt;It is always a good idea to only return the columns that are required by the Flow. Under Manage Columns you can select Choose columns. When the dialog is selected, you can tick or un-tick any column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="choosing columns" class="gallery-image" data-flex-basis="283px" data-flex-grow="118" height="576" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-query-in-microsoft-flow-1/Flow-PQ_011.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The choose columns step has a cog wheel so can be modified at any point. I recommend you use this step rather than delete columns as that cannot be tweaked using the cog wheel.&lt;/p&gt;
&lt;h3 id="finishing"&gt;Finishing
&lt;/h3&gt;&lt;p&gt;When you have finished transforming your data you can click Create on a new query or Update if you are editing an existing query. You can now use the data returned just as you would for getting items from any source.&lt;/p&gt;
&lt;h3 id="resources-for-power-query-in-microsoft-flow"&gt;Resources for Power Query in Microsoft Flow
&lt;/h3&gt;&lt;p&gt;As always there are a selection of resources out on the web.&lt;/p&gt;
&lt;p&gt;•Microsoft &lt;a class="link" href="https://flow.microsoft.com/en-us/blog/powerquery-flow/" target="_blank" rel="noopener"
 &gt;https://flow.microsoft.com/en-us/blog/powerquery-flow/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Chris Webb&lt;a class="link" href="https://blog.crossjoin.co.uk/2018/09/26/using-power-query-and-microsoft-flow-to-automate-the-creation-of-csv-files/" target="_blank" rel="noopener"
 &gt;https://blog.crossjoin.co.uk/2018/09/26/using-power-query-and-microsoft-flow-to-automate-the-creation-of-csv-files/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Erik Svensen&lt;a class="link" href="https://eriksvensen.wordpress.com/2018/09/25/powerquery-everywhere-now-in-microsoftflow-as-well/" target="_blank" rel="noopener"
 &gt;https://eriksvensen.wordpress.com/2018/09/25/powerquery-everywhere-now-in-microsoftflow-as-well/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Power Query is a great addition to the Flow tool set. I am really hoping for more data sources to be allowed and for the online Power Query to include more features from the desktop version.&lt;/p&gt;
&lt;p&gt;This is just an introduction so I will include best practices and further features.&lt;/p&gt;</description></item><item><title>SVG in Power BI Part 7 – Using a Theme File to add SVG Icons</title><link>https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/</link><pubDate>Tue, 13 Aug 2019 13:01:24 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/cover.png" alt="Featured image of post SVG in Power BI Part 7 – Using a Theme File to add SVG Icons" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/"&gt;Introduction to SVG Basics&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/"&gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/"&gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/"&gt;Using Text in SVG&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/"&gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;SVG Icons in Conditional Formatting&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As part of the July 2019 update there were changes to conditional formatting and I covered the use of SVG based measures to add icons in part 6 of this series. In this post I am going to cover adding to or swapping the built in icons using a theme file and some SVG.&lt;/p&gt;
&lt;h3 id="overview-of-theme-files"&gt;Overview of Theme Files
&lt;/h3&gt;&lt;p&gt;Theme files are a JSON file with instructions for formatting your visuals. The formatting can include colours, fonts and now icons. Details of how to construct and use a theme file can be found in the links below.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/power-bi/desktop-report-themes" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/power-bi/desktop-report-themes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://powerbi.tips/tools/report-theme-generator-v3/" target="_blank" rel="noopener"
 &gt;https://powerbi.tips/tools/report-theme-generator-v3/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="adding-new-svg-icons"&gt;Adding New SVG Icons
&lt;/h3&gt;&lt;p&gt;Icons is a new section for the theme file. It is at the same level as the name. You need a name, url and description for the icon. I can see no evidence of the name or description being used. Please correct me if I am wrong.&lt;/p&gt;
&lt;p&gt;The url can be SVG code in a similar format to the measures from previous posts. So in this example my first icon is a red quarter of a circle. Below is the SVG code for the shape.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;data:image/svg+xml;utf8, 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;A simple theme file to create one extra icon would look like&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;span class="lnt"&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;name&amp;#34;: &amp;#34;New Icons&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;icons&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;complete025&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;url&amp;#34;: &amp;#34;data:image/svg+xml;utf8, &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;description&amp;#34;: &amp;#34;25% Complete&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This adds a single icon to the icons available in conditional formatting. It will be listed at the end of the icon list.&lt;/p&gt;
&lt;p&gt;&lt;img alt="icons list" class="gallery-image" data-flex-basis="225px" data-flex-grow="93" height="183" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/icons_21.png" width="172"&gt;&lt;/p&gt;
&lt;p&gt;I then expanded the list of icons to cope with 25%, 50%, 75% and 100% going from red through amber to green.After applying the the theme to my report I created conditional formatting rules to a table to use my new icons.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;name&amp;#34;: &amp;#34;Percent Icons&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;icons&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;complete025&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;url&amp;#34;: &amp;#34;data:image/svg+xml;utf8, &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;description&amp;#34;: &amp;#34;25% Complete&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;complete050&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;url&amp;#34;: &amp;#34;data:image/svg+xml;utf8, &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;description&amp;#34;: &amp;#34;50% Complete&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		 &amp;#34;complete075&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;				&amp;#34;url&amp;#34;:&amp;#34;data:image/svg+xml;utf8, &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;				&amp;#34;description&amp;#34;:&amp;#34;75% Complete&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		 },
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;complete100&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;url&amp;#34;: &amp;#34;data:image/svg+xml;utf8, &amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;description&amp;#34;: &amp;#34;100% Complete&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Conditional formatting rules" class="gallery-image" data-flex-basis="1236px" data-flex-grow="515" height="132" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/icons_23.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="table showing icons" class="gallery-image" data-flex-basis="214px" data-flex-grow="89" height="250" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/icons_22.png" width="223"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Adding a few extra icons to report is great. I am concerned that adding lots of complex icons will just make the report slow.&lt;/p&gt;
&lt;p&gt;In Microsoft’s announcement they say you can replace existing icons using a theme file. For this you need the resourceKey for the icons. I have not been able to find a list of icons and the example they give didn’t work for me.&lt;/p&gt;</description></item><item><title>Power Automate – Creating Adaptive Cards</title><link>https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/</link><pubDate>Wed, 07 Aug 2019 07:09:31 +0000</pubDate><guid>https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/</guid><description>&lt;p&gt;This post is to support a video posted on YouTube regarding creating adaptive cards for Microsoft Teams using Power Automate.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=nGEh04HAQsw" target="_blank" rel="noopener"
 &gt;&lt;img alt="YouTube Thumbnail" class="gallery-image" data-flex-basis="426px" data-flex-grow="177" height="270" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/youtube.jpg" width="480"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="designing-an-adaptive-card"&gt;Designing an Adaptive Card
&lt;/h2&gt;&lt;p&gt;Before you can post an adaptive card to a team you need to design the card. Cards are designed online on an interactive website that will build the JSON definition for you. In this post we will create a very simple card.&lt;/p&gt;
&lt;p&gt;::: info Instructions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Visit &lt;a class="link" href="https://adaptivecards.io/" target="_blank" rel="noopener"
 &gt;https://adaptivecards.io/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Designer on the top navigation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on New Card&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Drag TextBlock elements from the options on the left into the Card. Double
click on the text to change the text.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make changes to the layout and style as required. The JSON defining the card will be updated.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click Copy card JSON to copy the code to the clipboard.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;:::&lt;/p&gt;
&lt;p&gt;&lt;img alt="Creating adaptive cards" class="gallery-image" data-flex-basis="430px" data-flex-grow="179" height="379" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/IntroCard_01.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Other elements could be added to the card and formatted as required.&lt;/p&gt;
&lt;h2 id="writing-the-flow"&gt;Writing the Flow
&lt;/h2&gt;&lt;p&gt;For this post the flow is going to be very simple. I start by adding a button trigger with a single string input called Message.&lt;/p&gt;
&lt;p&gt;&lt;img alt="manually trigger with message" class="gallery-image" data-flex-basis="803px" data-flex-grow="334" height="203" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/IntroCard_02.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Under the Teams connector, I find the Post your own adaptive card as the Flow bot to a channel. I select the Team and Channel that I want the message to go to.&lt;/p&gt;
&lt;p&gt;In the message I paste the Adaptive cards code copied earlier. I double click on the MESSAGE and then click in the Dynamic Content pane on Message to replace the text.&lt;/p&gt;
&lt;p&gt;&lt;img alt="edit adaptive card" class="gallery-image" data-flex-basis="423px" data-flex-grow="176" height="385" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/IntroCard_03.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="running-the-flow"&gt;Running the Flow
&lt;/h2&gt;&lt;p&gt;The flow can be run from your phone and the Flow app. Typing in a message will add the card to the channel in Teams.&lt;/p&gt;
&lt;p&gt;&lt;img alt="run the flow" class="gallery-image" data-flex-basis="432px" data-flex-grow="180" height="377" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/microsoft-flow-creating-adaptive-cards/IntroCard_04.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This is a very simple example of an adaptive card being posted in Teams. The possibilities are endless and are a great next step up from sending email notifications to multiple people.&lt;/p&gt;</description></item><item><title>SVG in Power BI Part 6 – New Icon Conditional Formatting</title><link>https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/</link><pubDate>Tue, 06 Aug 2019 10:37:05 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/cover.png" alt="Featured image of post SVG in Power BI Part 6 – New Icon Conditional Formatting" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/"&gt;Introduction to SVG Basics&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/"&gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/"&gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/"&gt;Using Text in SVG&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/"&gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;SVG Icons in Conditional Formatting&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In July 2019 Power BI Desktop update they included new conditional formatting on table and matrix to include icons. These icons can be defined using SVG which is pretty cool. So this is a new post in my Power BI SVG series looking how we can use SVG icons in conditional formatting.&lt;/p&gt;
&lt;h2 id="quick-overview-of-icon-conditional-formatting"&gt;Quick Overview of Icon Conditional Formatting
&lt;/h2&gt;&lt;p&gt;Once you have added a table or matrix visual to your report you can in formatting in the Conditional Formatting Section turn on Icons. This will immediately add icons to the selected column. In the example below icons were added to Turnover column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="icons" class="gallery-image" data-flex-basis="277px" data-flex-grow="115" height="212" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/icons_00.png" width="245"&gt;&lt;/p&gt;
&lt;p&gt;Clicking on Advanced controls link opens options behind the selection of icons. The default rules are for 3 icons at
&lt;img alt="icon rules" class="gallery-image" data-flex-basis="431px" data-flex-grow="179" height="378" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/icons_01.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In this post though I’m looking at using SVG to define and select the icon. So I will not be using rules but will be using a measure. The example is going to be based on a measure written in a previous post, &lt;a class="link" href="https://hatfullofdata.blog/svg-in-power-bi-part-2/" target="_blank" rel="noopener"
 &gt;KPI Shapes in Power BI&lt;/a&gt; The measure decides on an up or down arrow based on another measure called Growth.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Arrow = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Variables to store arrow paths
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var uparrow = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var downarrow = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Select arrow to use
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var arrow = IF([Growth]&amp;gt;=0,uparrow,downarrow)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Insert arrow into SVG
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var svg =&amp;#34;data:image/svg+xml;utf8,&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; arrow &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN svg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="arrow icons" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/SVG_206.png" width="300"&gt;&lt;/p&gt;
&lt;p&gt;The arrow is in its own column and doesn’t resize with font sizes. With the Icon update we can add the icon to any column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="conditional formatting icons" class="gallery-image" data-flex-basis="128px" data-flex-grow="53" height="342" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/icons_03.png" width="183"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select your table visual&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In visual format, expand Conditional Formatting&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the column and turn on Icons&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Advanced Controls&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change Format to Field Value&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change Based on Field to the measure, eg Arrow&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click OK&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="based on field value" class="gallery-image" data-flex-basis="540px" data-flex-grow="225" height="302" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/icons_02.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="added icons" class="gallery-image" data-flex-basis="294px" data-flex-grow="122" height="220" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/icons_04.png" width="270"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Icons update is an exciting one and much needed. It cuts out the need for SVG for many, which is great. Now with a little SVG we can add some conditional formatting without having to add the extra column.&lt;/p&gt;</description></item><item><title>Power BI – DAX CrossFilter Function</title><link>https://hatfullofdata.blog/power-bi-dax-crossfilter-function/</link><pubDate>Sat, 27 Jul 2019 07:59:23 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-dax-crossfilter-function/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/crossfilter_01.jpg" alt="Featured image of post Power BI – DAX CrossFilter Function" /&gt;&lt;p&gt;In this post I am continuing my campaign against bi-directional relationships. This is an introduction of the CROSSFILTER function, which can be used to simulate the bi-directional relationship in a calculation.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The Problem
&lt;/h2&gt;&lt;p&gt;Yesterday I posted regarding &lt;a class="link" href="https://hatfullofdata.blog/power-bi-cascading-slicers/" target="_blank" rel="noopener"
 &gt;Cascading Filters&lt;/a&gt; and removing the need for bi-directional joins to filter slicers. Another reason I’ve seen users using the bi-directional filter is to do a calculation.&lt;/p&gt;
&lt;p&gt;Using the same example as yesterday, see the link above, I created a measure to count the number of products.&lt;/p&gt;
&lt;p&gt;&lt;img alt="count formula" class="gallery-image" data-flex-basis="3022px" data-flex-grow="1259" height="54" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/crossfilter_02.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Then added a card to count the number of products. With no filters applied it shows 7 products which matches the table and the slicer.&lt;/p&gt;
&lt;p&gt;&lt;img alt="first report" class="gallery-image" data-flex-basis="384px" data-flex-grow="160" height="424" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/crossfilter_03.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Selecting Daisy Delights from the Shop slicer, the table reduces to 5 rows, and after yesterday’s post, the Product slicer also reduces to 5 rows, but the Product Count card still shows 7.&lt;/p&gt;
&lt;p&gt;&lt;img alt="filtered report" class="gallery-image" data-flex-basis="409px" data-flex-grow="170" height="399" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/crossfilter_01.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The big bad bi-directional join would be one method to solve this, but that is not good practice and I’m not suggesting that.&lt;/p&gt;
&lt;h2 id="crossfilter-function"&gt;CROSSFILTER Function
&lt;/h2&gt;&lt;p&gt;The CROSSFILTER function can be used within a CALCULATE function to specify a direction for relationship to be used between 2 tables. The options for the directions are None, One or Both. So I use this in the measure&lt;/p&gt;
&lt;p&gt;&lt;img alt="crossfilter function" class="gallery-image" data-flex-basis="1245px" data-flex-grow="519" height="131" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/crossfilter_04.jpg" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Now when I select Daisy Delights on the report, the measure shown in the card changes to 5. The card value matches the other filtered elements.&lt;/p&gt;
&lt;p&gt;&lt;img alt="corrected filtered report" class="gallery-image" data-flex-basis="389px" data-flex-grow="162" height="419" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-dax-crossfilter-function/crossfilter_05.jpg" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Keeping data models as simple is vital to allow for reports to be kept maintained in the future. CROSSFILTER function is a great addition to the options for calculating measures.&lt;/p&gt;
&lt;p&gt;Microsoft’s documentation can be found at &lt;a class="link" href="https://docs.microsoft.com/en-us/dax/crossfilter-function" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/dax/crossfilter-function&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Power BI – Cascading Slicers</title><link>https://hatfullofdata.blog/power-bi-cascading-slicers/</link><pubDate>Fri, 26 Jul 2019 08:00:23 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-cascading-slicers/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_03.png" alt="Featured image of post Power BI – Cascading Slicers" /&gt;&lt;p&gt;In this post I will look at filtering one slicer based a selection in another slicer a.k.a. cascading slicers. June 2019 Power BI Update included an update to allow a slicer to be filtered based on a measure, which means that you no longer need to use bi-directional relationships.&lt;/p&gt;
&lt;h2&gt;Slicer Series&lt;/h2&gt;
&lt;p&gt;This series will cover different topics regarding slicers.&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-slicer-introduction/"&gt;Slicers Introduction&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-resetting-slicers-with-a-bookmark-button/"&gt;Resetting Slicers with a Bookmark Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Cascading Slicers&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-hierarchy-slicer/"&gt;Hierarchy Slicer&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-introducing-sync-slicers/"&gt;Sync Slicers&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-clear-all-slicers-button/"&gt;Clear all Slicers Button&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;Relative Date Slicer&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="problem-overview"&gt;Problem Overview
&lt;/h3&gt;&lt;p&gt;My simple example is a report showing sales of a product in different shops. The example report contains three tables, Products, Shops and Sales and I’ve related the tables as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="relationship diagram" class="gallery-image" data-flex-basis="353px" data-flex-grow="147" height="344" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_01.png" width="506"&gt;&lt;/p&gt;
&lt;p&gt;Note the relationships show using arrows that Products can filter Sales and Shops can also filter Sales, and Sales cannot filter either Shops or Products. So I create a report with 2 slicers, a table showing product sales and a card showing total sales.&lt;/p&gt;
&lt;p&gt;&lt;img alt="report page" class="gallery-image" data-flex-basis="362px" data-flex-grow="150" height="369" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_02.png" width="557"&gt;&lt;/p&gt;
&lt;p&gt;If I use the Shop Name slicer to filter to Daisy Delights the card and table filter to only show the sales of the 5 products that Daisy Delights sell. BUT the slicer of products does not get filtered.&lt;/p&gt;
&lt;p&gt;&lt;img alt="cascading slicer not working" class="gallery-image" data-flex-basis="351px" data-flex-grow="146" height="360" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_03.png" width="527"&gt;&lt;/p&gt;
&lt;h3 id="creating-the-measure"&gt;Creating the Measure
&lt;/h3&gt;&lt;p&gt;So we want to create a measure to indicate if there are sales records. My initial reaction was to create a boolean (True / False) measure using ISEMPTY on the Sales table something similar to&lt;/p&gt;
&lt;p&gt;&lt;img alt="first attempt" class="gallery-image" data-flex-basis="2498px" data-flex-grow="1040" height="44" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_04.png" width="458"&gt;&lt;/p&gt;
&lt;p&gt;Puzzled I went looking, and of course the best site SQLBI gave me the answer to use. The links I used were:&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/articles/syncing-slicers-in-power-bi/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/syncing-slicers-in-power-bi/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.sqlbi.com/articles/check-empty-table-condition-with-dax/" target="_blank" rel="noopener"
 &gt;https://www.sqlbi.com/articles/check-empty-table-condition-with-dax/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That measure would be True if Sales records exist and False if no Sales records exist. Sadly this measure doesn’t work as a slicer filter so we need to convert the True and False to numbers 1 and 0, the fastest way to do this INT function. So the above measure becomes&lt;/p&gt;
&lt;p&gt;&lt;img alt="sales exits = int( not( isempty(Sales)))" class="gallery-image" data-flex-basis="2880px" data-flex-grow="1200" height="44" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_05.png" width="528"&gt;&lt;/p&gt;
&lt;h3 id="filtering-the-slicer"&gt;Filtering the Slicer
&lt;/h3&gt;&lt;p&gt;We then need to add the measure to the slicer filters. I select the slicer and drag the measure into the filter pane. I then set the operator to is and the value to 1. Then I click Apply Filter and the list of products is now filtered to only 5 products. The Product slicer is now a cascading slicer and will filter based on shop selected.&lt;/p&gt;
&lt;p&gt;&lt;img alt="using measure" class="gallery-image" data-flex-basis="326px" data-flex-grow="135" height="379" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-cascading-slicers/FilterSlicers_06.png" width="515"&gt;&lt;/p&gt;
&lt;h3 id="conclusion-to-cascading-slicers"&gt;Conclusion to Cascading Slicers
&lt;/h3&gt;&lt;p&gt;Even though I would prefer to use the boolean filter as that makes logical sense to me, this is a cool update and it reduces those nasty bi-directional filters.&lt;/p&gt;</description></item><item><title>Power BI – Using Inactive Relationships in a Measure</title><link>https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/</link><pubDate>Thu, 25 Jul 2019 09:54:02 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/Tasks_00-1.png" alt="Featured image of post Power BI – Using Inactive Relationships in a Measure" /&gt;&lt;p&gt;In this post I will show a simple example of how to use an inactive relationship between two tables in a measure. The example I will use is a list of tasks with start and finish dates. The request is for how many tasks start per week and how many finish per week to be plotted on a column chart.&lt;/p&gt;
&lt;h2 id="youtube-version"&gt;YouTube Version
&lt;/h2&gt;&lt;a href='https://www.youtube.com/watch?v=HHfzwaD4NtA' target="_blank"&gt;
&lt;img alt='thumbnail from YouTube video' src='Power-BI-Using-Inactive-Relationships-in-a-Measure-Time-0_00_0000.png'&gt;
&lt;/a&gt;
&lt;h2 id="data-setup"&gt;Data Setup
&lt;/h2&gt;&lt;p&gt;The data for this report is a list of tasks in an Excel spreadsheet with an Task Id, Task Name, Start Date, and Finish Date columns. I have also added a calendar table with a Date column and a Start of Week column.&lt;/p&gt;
&lt;p&gt;In the relationships view I drag Date from Calendar onto Start Date in Tasks and a 1 to many relationship appears as expected. That will allow me to count the tasks starting.&lt;/p&gt;
&lt;p&gt;I also want to be able to count the finishing tasks, so I need a relationship to Finish Date from the calendar as well. So I drag the Date from Calendar onto Finish Date in Tasks. A relationship appears but this time it is dotted, which shows it is not the active relationship.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Showing 2 relationships" class="gallery-image" data-flex-basis="685px" data-flex-grow="285" height="180" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/Tasks_01.png" width="514"&gt;&lt;/p&gt;
&lt;p&gt;If you look in Manage relationships it will list both relationships but only one will be ticked as Active.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Manage relationships" class="gallery-image" data-flex-basis="1001px" data-flex-grow="417" height="163" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/Tasks_02.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="creating-the-measures"&gt;Creating the Measures
&lt;/h2&gt;&lt;p&gt;Now the relationships have been setup we can create the two measures to do the 2 different counts.&lt;/p&gt;
&lt;p&gt;The first measure is the simplest and will use the active relationship between Calendar[Date] and Tasks[Start Date]. It is just a count of the Tasks Id column.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Calculation" class="gallery-image" data-flex-basis="2645px" data-flex-grow="1102" height="45" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/Tasks_03.png" width="496"&gt;&lt;/p&gt;
&lt;p&gt;For the second measure to count the number of tasks finishing we need to use the other other relationship. We can do this by using the Calculate function and the UseRelationship function. The UseRelationship function allows you to use an inactive relationship by specifying the two related columns. It must be an existing relationship in the model.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Finishing tasks calculation" class="gallery-image" data-flex-basis="1170px" data-flex-grow="487" height="129" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/Tasks_04-1.png" width="629"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Tasks Finishing = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; CALCULATE(
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; COUNT( Tasks[Task ID] ),
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; USERELATIONSHIP( &amp;#39;Calendar&amp;#39;[Date], Tasks[Finish Date] )
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;We can now add these measures to a column chart to get a plot to compare starting to finishing tasks.&lt;/p&gt;
&lt;p&gt;&lt;img alt="building chart" class="gallery-image" data-flex-basis="481px" data-flex-grow="200" height="339" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-inactive-relationships-in-a-measure/Tasks_05.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The USERELATIONSHIP function is a powerful addition to your creating measures tool-set. It does have some restrictions and these are detailed in the official documentation at &lt;a class="link" href="https://docs.microsoft.com/en-us/dax/userelationship-function-dax" target="_blank" rel="noopener"
 &gt;https://docs.microsoft.com/en-us/dax/userelationship-function-dax&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Power BI – Data Refresh Date</title><link>https://hatfullofdata.blog/power-bi-data-refresh-date/</link><pubDate>Tue, 09 Jul 2019 07:55:29 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-data-refresh-date/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-data-refresh-date/RefreshDate_03.png" alt="Featured image of post Power BI – Data Refresh Date" /&gt;&lt;p&gt;In this post I will walk through adding a data refresh date on a report page. This is a vital part of the report as it will show the report consumers when the dataset was last refreshed and so how up-to date the report is.&lt;/p&gt;
&lt;p&gt;We need a date that will only get updated on a refresh so it needs to be defined in Power Query. So under Get Data select Blank Query and Power Query editor will open.&lt;/p&gt;
&lt;p&gt;Into the formula bar enter the following and press return.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;=DateTimeZone.UtcNow()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The = and () are vital, I spent a good 30 minutes one late evening wasting time due to missing out the brackets. You will get a result of the time in UTC.&lt;/p&gt;
&lt;p&gt;&lt;img alt="formula to table" class="gallery-image" data-flex-basis="603px" data-flex-grow="251" height="270" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-data-refresh-date/RefreshDate_01.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;The next step is to convert the answer into Table, so click on To Table on the DateTime Tools – Transform ribbon.&lt;/p&gt;
&lt;p&gt;Rename your query and the column and change the type of the column to Date/Time/Timezone and you now have a table with a single row of a refresh date in UTC.&lt;/p&gt;
&lt;p&gt;&lt;img alt="change type" class="gallery-image" data-flex-basis="536px" data-flex-grow="223" height="304" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-data-refresh-date/RefreshDate_02-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;After you select Close &amp;amp; Apply you will be able to add the Refresh UTCDate to a card to show the data refresh date.&lt;/p&gt;
&lt;p&gt;&lt;img alt="card to show date" class="gallery-image" data-flex-basis="337px" data-flex-grow="140" height="483" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-data-refresh-date/RefreshDate_03.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion-to-data-refresh-date"&gt;Conclusion to Data Refresh Date
&lt;/h2&gt;&lt;p&gt;This date will only show the date of the last refresh, this does not validate your data as being accurate if you have some other processes happening to prepare the data outside of the Power BI environment.&lt;/p&gt;</description></item><item><title>PowerApps – Using JSON Function to Save Pictures</title><link>https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/</link><pubDate>Mon, 08 Jul 2019 10:21:38 +0000</pubDate><guid>https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/</guid><description>&lt;img src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_10.png" alt="Featured image of post PowerApps – Using JSON Function to Save Pictures" /&gt;&lt;p&gt;In this post I will be explaining how to use the JSON Function to simplify the saving of multiple pictures from a PowerApp to a SharePoint library using Flow. There have been many wonderful workarounds to do this, finally we now have a slightly less Heath-Robinson method.&lt;/p&gt;
&lt;h2 id="set-up-the-powerapp"&gt;Set up the PowerApp
&lt;/h2&gt;&lt;p&gt;I start with a blank app, canvas or phone layout. Because my main client uses Windows 10 tablet / laptops to take the pictures I add a camera control. Then I change the OnSelect property to store the picture into a collection. I include an index column so Flow can calculate a unique filename later.&lt;/p&gt;
&lt;p&gt;&lt;img alt="camera onselect action" class="gallery-image" data-flex-basis="502px" data-flex-grow="209" height="325" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_01-3.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;I then add a blank gallery and change the Items to be the collection populated by the camera, e.g. ccPictures and to make a grid I change the wrap to be 3. I add an Image control to the gallery so as I take pictures it will populate the grid.&lt;/p&gt;
&lt;p&gt;&lt;img alt="gallery settings" class="gallery-image" data-flex-basis="138px" data-flex-grow="57" height="1024" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_02.png" width="591"&gt;&lt;/p&gt;
&lt;p&gt;Then I take some pictures to populate my collection. Obviously everyone needs photos of their Lego character collection.&lt;/p&gt;
&lt;p&gt;&lt;img alt="lego pictures" class="gallery-image" data-flex-basis="762px" data-flex-grow="317" height="214" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_03-1.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;In order for the pictures to be passed to Flow to be saved to SharePoint I need to convert the collection into JSON. So I add a button with the following code. Please note the second parameter of the JSON function is IncludeBinaryData as we want to include the pictures which are binary data.&lt;/p&gt;
&lt;p&gt;&lt;img alt="save pictures button on select" class="gallery-image" data-flex-basis="662px" data-flex-grow="276" height="246" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_04.png" width="679"&gt;&lt;/p&gt;
&lt;h2 id="building-the-flow"&gt;Building the Flow
&lt;/h2&gt;&lt;p&gt;In the previous section, I created the app to make the JSON string to be processed by a Flow. So I now I will create a new flow with a PowerApp trigger.&lt;/p&gt;
&lt;p&gt;The first step to add is a Parse JSON action to convert the JSON into an array. In order for the parameter requested by Flow to be named nicely I rename the step to just “JSON” and then in the Content box I click on Ask in PowerApps. Now the parameter is called JSON_Content. Afterwards you can rename the action back to Parse JSON and it won’t rename the parameter.&lt;/p&gt;
&lt;p&gt;&lt;img alt="parse json" class="gallery-image" data-flex-basis="396px" data-flex-grow="165" height="412" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_05.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;For the Schema you need to understand JSON a little. The JSON you return will be multiple rows each with 2 columns, Picture which is a string and Index which is a number. So in a text editor I create small example JSON string with multiple rows of data and copy it.&lt;/p&gt;
&lt;p&gt;&lt;img alt="example json" class="gallery-image" data-flex-basis="823px" data-flex-grow="342" height="198" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_06.png" width="679"&gt;&lt;/p&gt;
&lt;p&gt;Then in the Parse JSON action I click on Use sample payload to generate schema and I paste my example in, clicking Done will create the schema.&lt;/p&gt;
&lt;p&gt;&lt;img alt="parse json with schema" class="gallery-image" data-flex-basis="428px" data-flex-grow="178" height="381" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_07.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The next step is for every item in the array to save a picture. So we start with an Apply to each action which will use the Body from the Parse JSON step.&lt;/p&gt;
&lt;p&gt;Then we add a SharePoint action to Create file. Site address and path you will need to get from the SharePoint destination. The File Name I create using the Index value.&lt;/p&gt;
&lt;p&gt;The File Content uses an Expression. So click on Expression and find the function decodeDataUri. The parameter for the function is the Picture value, which doesn’t appear in the offered Dynamic content, so we need to use the Item() function and then add ?[‘Picture’].&lt;/p&gt;
&lt;p&gt;&lt;img alt="creating the image file" class="gallery-image" data-flex-basis="597px" data-flex-grow="249" height="273" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_08.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="connecting-powerapp-to-the-flow"&gt;Connecting PowerApp to the Flow
&lt;/h2&gt;&lt;p&gt;We now have a Flow ready to receive JSON data and save pictures. So we now just need to connect them. In my experience adding a flow to a button that already has code does not end well, I usually loose the existing code. So I add a second button and from the Action ribbon click Flows and connect up my Flow and pass in as the parameter the variable containing the JSON, e.g. vvJSON. Then I copy and paste this code into the button that creates the JSON string.&lt;/p&gt;
&lt;p&gt;&lt;img alt="connect powerapp with json function to file" class="gallery-image" data-flex-basis="523px" data-flex-grow="217" height="312" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_09.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The app is now ready to test.&lt;/p&gt;
&lt;p&gt;&lt;img alt="images in library" class="gallery-image" data-flex-basis="464px" data-flex-grow="193" height="351" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-using-json-function-to-save-pictures/JSONPicture_10.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;The above solution is a very simple example of how the JSON function could be used. Before this went into production I would do better file naming. I have tested the above app to take 30 photos and save them to SharePoint and it worked fine. I assume there is a limit to the size of the JSON.&lt;/p&gt;
&lt;p&gt;The JSON function does allow a whole collection to be passed to Flow easily. I will be looking for other possible uses.&lt;/p&gt;</description></item><item><title>Power BI – Conditional Formatting Update</title><link>https://hatfullofdata.blog/power-bi-conditional-formatting-update/</link><pubDate>Thu, 13 Jun 2019 19:26:40 +0000</pubDate><guid>https://hatfullofdata.blog/power-bi-conditional-formatting-update/</guid><description>&lt;img src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/cover.png" alt="Featured image of post Power BI – Conditional Formatting Update" /&gt;&lt;p&gt;The June 2019 update for Power BI included a few updates for conditional formatting, for visual backgrounds, titles, cards and gauges. This post is my take on the updates and on how I prefer to do the logic behind choosing a colour.&lt;/p&gt;
&lt;p&gt;Full details of the June 2019 update can be found at &lt;a class="link" href="https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-june-2019-feature-summary/" target="_blank" rel="noopener"
 &gt;https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-june-2019-feature-summary/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="applying-conditional-colour-formatting"&gt;Applying Conditional Colour Formatting
&lt;/h2&gt;&lt;p&gt;This update added to the places conditional colour formatting can be applied. In every place, the method of applying it is the same, the trick is working out which visuals will let you do what.&lt;/p&gt;
&lt;p&gt;When you look at a visual’s formatting properties, right click on a colour selector. If Conditional Formatting appears then you can add rules if nothing appears then you can’t.&lt;/p&gt;
&lt;p&gt;&lt;img alt="test right click" class="gallery-image" data-flex-basis="198px" data-flex-grow="82" height="314" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/Conditional_101.png" width="260"&gt;&lt;/p&gt;
&lt;p&gt;When it is applied, the colour is shown as Fx symbol.&lt;/p&gt;
&lt;p&gt;&lt;img alt="fx symbol" class="gallery-image" data-flex-basis="198px" data-flex-grow="82" height="313" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/Conditional_102.png" width="259"&gt;&lt;/p&gt;
&lt;h2 id="list-of-locations"&gt;List of Locations
&lt;/h2&gt;&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Visual&lt;/th&gt;
					&lt;th&gt;Section&lt;/th&gt;
					&lt;th&gt;Property&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Most Visuals&lt;/td&gt;
					&lt;td&gt;Title&lt;/td&gt;
					&lt;td&gt;Font color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Most Visuals&lt;/td&gt;
					&lt;td&gt;Title&lt;/td&gt;
					&lt;td&gt;Background color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Most Visuals&lt;/td&gt;
					&lt;td&gt;Background&lt;/td&gt;
					&lt;td&gt;Color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Stacked Bar Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Clustered Bar Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Stacked Column Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Clustered Column Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Line and Stacked Column Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Line and Clustered Column Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Scatter Chart&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color*&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Treemap&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Advanced Controls&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Funnel&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Default color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Gauge&lt;/td&gt;
					&lt;td&gt;Data colors&lt;/td&gt;
					&lt;td&gt;Fill&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Card&lt;/td&gt;
					&lt;td&gt;Data label&lt;/td&gt;
					&lt;td&gt;Color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Card&lt;/td&gt;
					&lt;td&gt;Category label&lt;/td&gt;
					&lt;td&gt;Color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Table&lt;/td&gt;
					&lt;td&gt;Conditional Formatting&lt;/td&gt;
					&lt;td&gt;Background Color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Table&lt;/td&gt;
					&lt;td&gt;Conditional formatting&lt;/td&gt;
					&lt;td&gt;Font color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Matrix&lt;/td&gt;
					&lt;td&gt;Conditional formatting&lt;/td&gt;
					&lt;td&gt;Background Color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Matrix&lt;/td&gt;
					&lt;td&gt;Conditional formatting&lt;/td&gt;
					&lt;td&gt;Font color&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Matrix&lt;/td&gt;
					&lt;td&gt;Conditional formatting&lt;/td&gt;
					&lt;td&gt;Data bars&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="methods-of-applying-conditional-formatting"&gt;Methods of Applying Conditional Formatting
&lt;/h2&gt;&lt;p&gt;There are three methods of applying conditional formatting: color scale, rules, and field value.&lt;/p&gt;
&lt;h3 id="colour-scale"&gt;Colour Scale
&lt;/h3&gt;&lt;p&gt;&lt;img alt="colour scale dialog" class="gallery-image" data-flex-basis="457px" data-flex-grow="190" height="357" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/Conditional_103.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="rules"&gt;Rules
&lt;/h3&gt;&lt;p&gt;&lt;img alt="rules for formatting" class="gallery-image" data-flex-basis="490px" data-flex-grow="204" height="333" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/Conditional_104.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="field-value"&gt;Field Value
&lt;/h3&gt;&lt;p&gt;&lt;img alt="field value" class="gallery-image" data-flex-basis="555px" data-flex-grow="231" height="294" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/Conditional_105.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="colour-measures"&gt;Colour Measures
&lt;/h2&gt;&lt;p&gt;One of my issues with Color scale or Rules is you cannot use multiple column values or measures in the colour choice. Field Value gives a work around for this by allowing you to use a Measure.&lt;/p&gt;
&lt;p&gt;I have a very simple example of a list of Stores which have a Target and Sales value. So I create a measure that calculates a colour string based on Sales and Target using an IF function.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-C++" data-lang="C++"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;SalesColour&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sales&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Sales&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Sales&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Target&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s"&gt;&amp;#34;#006400&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Green
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s"&gt;&amp;#34;#BF0000&amp;#34;&lt;/span&gt; &lt;span class="c1"&gt;// Red
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I then used Field Value conditional formatting to format a gauge fill.&lt;/p&gt;
&lt;p&gt;&lt;img alt="guages" class="gallery-image" data-flex-basis="1174px" data-flex-grow="489" height="139" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/power-bi-conditional-formatting-update/Conditional_106.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Conditional formatting is getting there but it is still limited, and we have been spoiled by Excel. I expect more updates will come and I will need to update the table above.&lt;/p&gt;</description></item><item><title>SVG in Power BI – Part 5 – Using SVG Rotate</title><link>https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/</link><pubDate>Sat, 08 Jun 2019 21:36:23 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/cover.png" alt="Featured image of post SVG in Power BI – Part 5 – Using SVG Rotate" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/"&gt;Introduction to SVG Basics&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/"&gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/"&gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/"&gt;Using Text in SVG&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Using SVG Rotate to create a dial in Power BI&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/"&gt;SVG Icons in Conditional Formatting&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this post I will introduce the possibilities that SVG rotate gives. This post will walk through creating a dial. This post will be done in 2 stages, first a simple dial and then add colours.&lt;/p&gt;
&lt;h2 id="simple-dial"&gt;Simple Dial
&lt;/h2&gt;&lt;p&gt;We will start with a simple dial, made up of an arch with a line to indicate a percentage.&lt;/p&gt;
&lt;p&gt;The arch is made using a path which combines 2 arcs to make an arch. The arch is then nested in a group element that applies a fill.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Simple Dial = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// arch shape
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_arch = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// light blue arch
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_blue_arch = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_blue_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="arch shape" class="gallery-image" data-flex-basis="376px" data-flex-grow="156" height="404" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/SVG_501.png" width="633"&gt;&lt;/p&gt;
&lt;p&gt;We now need to add a line that will move based on a measure called Score using SVG rotate. So I start by calculating the rotation angle and drawing a line that matches the bottom left of the arch and then rotate it centered on the center point of the arch.&lt;/p&gt;
&lt;p&gt;The rotation will be 0 to 180 degrees and the measure Score is a percentage so the calculation is [Score] * 180.&lt;/p&gt;
&lt;p&gt;The line is drawn from 0,50 to 20,50 and then a transform is applied of a rotate which has 3 parameters, angle to rotate, x and y for the centre of the rotation. So the bottom part of my measure becomes&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// light blue arch
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_blue_arch = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// draw line and rotate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_rotate = [Score] * 180
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_line = &amp;#34;- &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_blue_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_line &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="add line" class="gallery-image" data-flex-basis="371px" data-flex-grow="154" height="392" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/SVG_502.png" width="607"&gt;&lt;/p&gt;
&lt;h2 id="show-the-value"&gt;Show the Value
&lt;/h2&gt;&lt;p&gt;To make it very obvious what value is shown I’m going to add the value of the Score measure. The centre of the arch is 50,50 so I’ll put the middle of the text at 50,40. I used the FORMAT function to apply a percentage, “0%”, format to the score. (See the previous post in this series to look at SVG text)&lt;/p&gt;
&lt;p&gt;The bottom part of the measure now becomes&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var svg_line = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Show Score value
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_score = &amp;#34;&amp;#34;&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;FORMAT([Score],&amp;#34;0%&amp;#34;)&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_blue_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_line &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_score &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="add text" class="gallery-image" data-flex-basis="384px" data-flex-grow="160" height="375" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/SVG_503.png" width="600"&gt;&lt;/p&gt;
&lt;h2 id="adding-colours"&gt;Adding Colours
&lt;/h2&gt;&lt;p&gt;For this I researched being able to draw parts of an arch. In order to do that I would need to calculate the end points of each arch, which was possible but involved way more mathematics than I was willing to re-learn. My days of using Cos, Sin and Tan have long gone.&lt;/p&gt;
&lt;p&gt;So I the trick I used was to draw the arch upside down out of sight and rotate the arch around into view. Different coloured arches can be rotated into view to show different colours.&lt;/p&gt;
&lt;p&gt;To draw the arch up the other way I just changed 2 values in svg_arch variable. When drawing an arc in SVG the 5th number after the A specifies which way round the to reach the final point. So the svg_arch variable becomes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// arch shape
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_arch = &amp;#34; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then we add a coloured arch rotated for each part of the gauge. In my example I am going to show Green upto 100%, Amber starts at 75% and Red at 50%. So the complete measure code now is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Coloured Dial = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// arch shape
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_arch = &amp;#34; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// coloured arches
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_green_arch = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_amber_arch = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_red_arch = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// draw line and rotate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_rotate = [Score] * 180
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_line = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Show Score value
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_score = &amp;#34;&amp;#34;&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;FORMAT([Score],&amp;#34;0%&amp;#34;)&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_green_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_amber_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_red_arch &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_line &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_score &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="finished dial created using svg rotate" class="gallery-image" data-flex-basis="370px" data-flex-grow="154" height="396" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/SVG_505.png" width="611"&gt;&lt;/p&gt;
&lt;h2 id="conclusion-to-svg-rotate"&gt;Conclusion to SVG Rotate
&lt;/h2&gt;&lt;p&gt;This post ended up being longer than I expected so my series will expand to make use of a table to store the colour values in another post and drawing a clock into another post.&lt;/p&gt;</description></item><item><title>PowerApps – Transparency Update</title><link>https://hatfullofdata.blog/powerapps-transparency-update/</link><pubDate>Fri, 07 Jun 2019 17:53:58 +0000</pubDate><guid>https://hatfullofdata.blog/powerapps-transparency-update/</guid><description>&lt;img src="https://hatfullofdata.blog/powerapps-transparency-update/Trans_02.png" alt="Featured image of post PowerApps – Transparency Update" /&gt;&lt;p&gt;A small update was sneaked in this week to help handling transparency with colours in PowerApps.&lt;/p&gt;
&lt;h3 id="colorvalue-function-update"&gt;ColorValue Function Update
&lt;/h3&gt;&lt;p&gt;ColorValue function takes a colour value as a hex string and converts it into a colour values. In the example below #FF0000 fills a rectangle in Red.&lt;/p&gt;
&lt;p&gt;&lt;img alt="red rectangle" class="gallery-image" data-flex-basis="780px" data-flex-grow="325" height="209" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-transparency-update/Trans_01.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;The update now allows another 2 characters to the string to specify transparency. Like the red,green and blue values the transparency ranges from 0 to 255 or in hex 00 to FF&lt;/p&gt;
&lt;p&gt;In the example below the red is made 50% transparent, 80 in HEX is 128 in decimal which is 255 / 2, hence 50%.&lt;/p&gt;
&lt;p&gt;&lt;img alt="overlapping rectangles" class="gallery-image" data-flex-basis="666px" data-flex-grow="277" height="245" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-transparency-update/Trans_02.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="transparent-colour"&gt;Transparent Colour
&lt;/h3&gt;&lt;p&gt;In the list of available preset colours such as AliceBlue, Aqua etc now includes a colour Transparent.&lt;/p&gt;
&lt;p&gt;&lt;img alt="transparent colour" class="gallery-image" data-flex-basis="540px" data-flex-grow="225" height="302" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/powerapps-transparency-update/Trans_03.png" width="680"&gt;&lt;/p&gt;
&lt;h3 id="conclusion"&gt;Conclusion
&lt;/h3&gt;&lt;p&gt;Small update but one thats very welcome! Now I just want to be able to use ColorFade or similar function to take an existing fill and give a more or less transparent version.&lt;/p&gt;</description></item><item><title>SVG in Power BI – Part 4 – Adding SVG Text</title><link>https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/</link><pubDate>Tue, 21 May 2019 23:13:44 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/cover.png" alt="Featured image of post SVG in Power BI – Part 4 – Adding SVG Text" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/"&gt;Introduction to SVG Basics&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/"&gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/"&gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Using Text in SVG&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/"&gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/"&gt;SVG Icons in Conditional Formatting&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is the fourth post in my series on using SVG in Power BI introducing adding SVG text and actually solves one of the niggles I had with doing KPI figures in Power BI. I didn’t get to do this part as part of my session which started this series. Here is the list of posts.&lt;/p&gt;
&lt;p&gt;&lt;img alt="KPI Visual" class="gallery-image" data-flex-basis="289px" data-flex-grow="120" height="293" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/SVG_401.png" width="353"&gt;&lt;/p&gt;
&lt;p&gt;My niggle was the KPI visual. It is a fast way to have a red or green measure displayed. BUT, it requires a trend axis even if you don’t want one and it includes a tiny red exclamation mark or green tick. So I wanted the red / green and the goal shown with no trend or ticks and exclamation marks.&lt;/p&gt;
&lt;h2 id="simple-text-element"&gt;Simple Text Element
&lt;/h2&gt;&lt;p&gt;SVG Text elements need an x and y attributes to position the text and a style attribute that uses CSS notation to choose font properties. The example below has the word Hello where the bottom lower left corner is at 20,60.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Text Measure = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// text element including a style tag
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_text =&amp;#34;Hello&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_text &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="hello" class="gallery-image" data-flex-basis="209px" data-flex-grow="87" height="358" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/SVG_402.png" width="312"&gt;&lt;/p&gt;
&lt;h2 id="aligning-svg-text"&gt;Aligning SVG Text
&lt;/h2&gt;&lt;p&gt;If I am going to replace the KPI visual I need to place a number centred in the SVG graphic. The default alignment is the x and y are the bottom left. This can be changed using the text-anchor attribute for the text element; it can be set to start, middle or end.&lt;/p&gt;
&lt;p&gt;Below is an example of the string ABC being aligned start, middle and end.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Text Measure = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// text element including a style tag
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_text1 =&amp;#34;ABC&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_text2 =&amp;#34;ABC&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_text3 =&amp;#34;ABC&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_text1 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_text2 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_text3 &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="aligning text" class="gallery-image" data-flex-basis="216px" data-flex-grow="90" height="342" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/SVG_403.png" width="308"&gt;&lt;/p&gt;
&lt;h2 id="my-kpi-visual"&gt;My KPI Visual
&lt;/h2&gt;&lt;p&gt;To replace the KPI shown at the start of this post I want a number in the middle of the square showing the measure, bottom left the goal and bottom right how close to the goal we were.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;My KPI = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// 3 text elements, actual, goal and % close
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_Indicator =&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Total Sales],&amp;#34;#,##0&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_goal = &amp;#34;Goal&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Target Sales],&amp;#34;#,##0&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_close =&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([KPI Close],&amp;#34;0%&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_Indicator &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_goal &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_close &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="SVG KPI " class="gallery-image" data-flex-basis="210px" data-flex-grow="87" height="386" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/SVG_404.png" width="339"&gt;&lt;/p&gt;
&lt;p&gt;Format function is used to format the number into comma, #,##0 and percent, 0% formats.&lt;/p&gt;
&lt;p&gt;The last part is to colour the number based on the Indicator reaching the target. This was covered in Part 2 of this series so I’ll just give the final code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;My KPI = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// calculate colour for element
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var ind_colour = IF([Total Sales]&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Total Sales],&amp;#34;#,##0&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_goal = &amp;#34;Goal&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([Target Sales],&amp;#34;#,##0&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_close =&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; FORMAT([KPI Close],&amp;#34;0%&amp;#34;) &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_Indicator &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_goal &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_close &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="add colour to KPI" class="gallery-image" data-flex-basis="207px" data-flex-grow="86" height="394" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/SVG_405.png" width="340"&gt;&lt;/p&gt;
&lt;h2 id="my-kpi-in-a-table"&gt;My KPI in a Table
&lt;/h2&gt;&lt;p&gt;One advantage of the SVG text KPI over the KPI visual is it can be embedded within a table. The total line will work as long as the number measures work.&lt;/p&gt;
&lt;p&gt;&lt;img alt="table of svg kpis" class="gallery-image" data-flex-basis="112px" data-flex-grow="46" height="864" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/SVG_406.png" width="404"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Adding SVG text to a visual does make the visual more informative and the above example makes conditional formatting and data layout possible in a table.&lt;/p&gt;</description></item><item><title>SVG in Power BI – Part 3 – Fill SVG Icon with Colour</title><link>https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/</link><pubDate>Mon, 29 Apr 2019 22:30:35 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/cover.png" alt="Featured image of post SVG in Power BI – Part 3 – Fill SVG Icon with Colour" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/"&gt;Introduction to SVG Basics&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/"&gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;Filling up with colour using SVG in Power BI&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/"&gt;Using Text in SVG&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/"&gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/"&gt;SVG Icons in Conditional Formatting&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this post we will introduce using icons and filling the icon with colour to show a percentage value.&lt;/p&gt;
&lt;h2 id="getting-icon-code"&gt;Getting Icon Code
&lt;/h2&gt;&lt;p&gt;You can download icons from lots of web sites. Search for SVG icons or ask your marketing teams for company graphics as SVG. If you are using Office 2016 or above the icons in PowerPoint can be saved as SVG files. Icons can be found on the Insert ribbon and once inserted on a slide, right click and save as a picture.&lt;/p&gt;
&lt;p&gt;&lt;img alt="save icon as picture" class="gallery-image" data-flex-basis="535px" data-flex-grow="222" height="305" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/SVG_301.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;Once you have the SVG icon take a look at the SVG code. There will be an open tag with lots of attributes then one or more elements and then a closing tag . You need to do a search replace the double quotes into single quotes, e.g. and its long so I save it into a measure.&lt;/p&gt;
&lt;p&gt;&lt;img alt="svg of icon" class="gallery-image" data-flex-basis="1020px" data-flex-grow="425" height="160" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/SVG_302a.png" width="680"&gt;&lt;/p&gt;
&lt;h2 id="draw-2-elephants"&gt;Draw 2 Elephants
&lt;/h2&gt;&lt;p&gt;We are going to draw 2 elephants, one grey and one coloured one on top. The coloured one we will clip to size to show it being filled up.&lt;/p&gt;
&lt;p&gt;Next task is to create a measure in our report. Inside the measure we create 2 variables, one to store the svg start and one for the svg end. As a quick test we return the concatenation of the variables and the previous created measure to draw our icon.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Elephant Measure = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If you use the custom visual Image from Cloud Scope you can add the measure and the icon will be shown in Power BI.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="one elephant" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="150" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/SVG_303a.png" width="150"&gt;&lt;/p&gt;
&lt;p&gt;In order to draw a grey and red elephant we will nest the elephant in a group tag and give the element properties that the nested elements will inherit.&lt;/p&gt;
&lt;p&gt;&lt;img alt="red elephant" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="150" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/SVG_304.png" width="150"&gt;&lt;/p&gt;
&lt;p&gt;I add 2 more variables one for the grey elephant and one for the red one. and tweak the return to use the new elephant variables. It will draw both elephants but they are exactly over each other so you only see the red one.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Elephant Measure = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Coloured Elephants
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var grey_ele = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var red_ele = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; grey_ele &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; red_ele &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="clip-the-red-elephant"&gt;Clip the Red Elephant
&lt;/h2&gt;&lt;p&gt;We now want to only show a percentage of the red elephant based off a percentage measure, e.g. work complete. For this we need to create a clip-path. A clip-path defines which part of the shape will be visible. So in this case it will be a rectangle starting at 0,0 and will be height = 100 and width = percentage measure * 100.&lt;/p&gt;
&lt;p&gt;So we create a variable to calculate the width and then a variable to store the defs tag that contains the clip-path. The red_ele variable is then tweaked to include a reference to the clip-path and the return is changed to include the defs variable.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Elephant Measure = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // defs
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var clip_width = [Work Complete] * 100 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var defs = &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Coloured Elephants
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var grey_ele = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var red_ele = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; defs &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; grey_ele &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; red_ele &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Now we have 2 measures, one that calculates a percentage and one that shows that percentage in colour.&lt;/p&gt;
&lt;p&gt;&lt;img alt="showing percentage" class="gallery-image" data-flex-basis="204px" data-flex-grow="85" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/SVG_306.png" width="256"&gt;&lt;/p&gt;
&lt;h2 id="filling-from-the-bottom-up"&gt;Filling from the bottom up
&lt;/h2&gt;&lt;p&gt;The above example fills from the left. It is the easiest to calculate but if someone was asked to draw this idea they would probably fill in the colour from the bottom up.&lt;/p&gt;
&lt;p&gt;Our icon is in a square which goes from 0,0 and is 100 wide and 100 tall. If we wanted to show 25% full the clip path would need to be 0,75 and 100 wide and 25 tall. So 2 values change the height is 25 = 100 * 25% and the starting y is 75 = 100 – height.&lt;/p&gt;
&lt;p&gt;So to fill from the bottom I need to change the defs&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Elephant Measure = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // svg essentials
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_start = &amp;#34;data:image/svg+xml;utf8,&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var svg_end = &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // defs
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var clip_height = [Work Complete] * 100 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var clip_y = 100 - clip_height
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var defs = &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Coloured Elephants
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var grey_ele = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; var red_ele = &amp;#34;&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; [EleSVG] &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;return
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; svg_start &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; defs &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; grey_ele &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; red_ele &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; svg_end
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="filling from the bottom up" class="gallery-image" data-flex-basis="200px" data-flex-grow="83" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/SVG_308.png" width="250"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This gives us a quick visual measure to show a percentage using an SVG icon.&lt;/p&gt;</description></item><item><title>SVG in Power BI Part 2 – KPI Shapes</title><link>https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/</link><pubDate>Sun, 28 Apr 2019 21:59:41 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_206.png" alt="Featured image of post SVG in Power BI Part 2 – KPI Shapes" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/"&gt;Introduction to SVG Basics&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;KPI Shapes in Power BI&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/"&gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/"&gt;Using Text in SVG&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/"&gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/"&gt;SVG Icons in Conditional Formatting&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this post I will show to use SVG to create simple KPI Indicators. In this example I have very simple data of a list of 5 shops with Turnover and Costs. I have added a measure for Profit Margin as a percentage.&lt;/p&gt;
&lt;h2 id="create-svg-measure"&gt;Create SVG Measure
&lt;/h2&gt;&lt;p&gt;We shall start with a simple SVG image of a dot and show how to create an SVG measure to use in a table.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a measure to store the SVG in a string.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RedDot = &amp;#34;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;http://www.w3.org/2000/svg&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0 0 100 100&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;cy=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;r=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;40&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;red&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start="2"&gt;
&lt;li&gt;Prefix the SVG with code to declare that it is an SVG image.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RedDot = &amp;#34;data:image/svg+xml;utf8,&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;http://www.w3.org/2000/svg&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0 0 100 100&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;cy=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;r=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;40&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;red&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;On the Modelling ribbon tab, change the measure’s data category to Image URL.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="data category" class="gallery-image" data-flex-basis="134px" data-flex-grow="56" height="491" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_201.png" width="275"&gt;&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Insert measure into a table. You will need to turn off the totals to make the total line not show svg code. I will fix this in a later post.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="red dots" class="gallery-image" data-flex-basis="208px" data-flex-grow="86" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_202.png" width="260"&gt;&lt;/p&gt;
&lt;h2 id="change-to-be-reactive"&gt;Change to be Reactive
&lt;/h2&gt;&lt;p&gt;The above example puts a red dot on every line. We will now adapt the measure to change the colour depending upon the measure Profit Margin measure to make this into a KPI shape.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We use a variable to store the colour and its value comes from an IF statement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We insert the colour into the SVG statement&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We return the SVG&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;KPI Dot = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Calculate the colour
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var colour = IF([Profit Margin]&amp;gt;0.25,&amp;#34;Green&amp;#34;,&amp;#34;Red&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Insert colour into SVG
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var svg = &amp;#34;data:image/svg+xml;utf8,&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;http://www.w3.org/2000/svg&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0 0 100 100&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;cy=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;r=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;40&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&amp;#34; &amp;amp; colour &amp;amp; &amp;#34;&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN svg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="773px" data-flex-grow="322" height="211" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_203.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="red and green dots" class="gallery-image" data-flex-basis="208px" data-flex-grow="87" height="300" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_204.png" width="261"&gt;&lt;/p&gt;
&lt;h2 id="up-and-down-arrows"&gt;Up and Down Arrows
&lt;/h2&gt;&lt;p&gt;The above example changed a colour which is okay but it would be better if we could also change the shape of the icon. For this example I use another measure of Growth which compares Turnover to previous turnover. If the Growth is positive I want to display a green up arrow and if negative a red down arrow.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set up variables for an up and down arrow&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select which arrow to use&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insert the arrow into the svg&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Return the svg.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Arrow = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Variables to store arrow paths
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var uparrow = &amp;#34;&lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;M10 90 L50 10 L90 90 Z&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;green&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var downarrow = &amp;#34;&lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;M10 10 L50 90 L90 10 Z&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;red&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Select arrow to use
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var arrow = IF([Growth]&amp;gt;=0,uparrow,downarrow)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Insert arrow into SVG
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;var svg =&amp;#34;data:image/svg+xml;utf8,&amp;#34; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;http://www.w3.org/2000/svg&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0 0 100 100&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; arrow &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;RETURN svg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="459px" data-flex-grow="191" height="355" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_205.png" width="680"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="kpi shapes: up and down arrows" class="gallery-image" data-flex-basis="300px" data-flex-grow="125" height="240" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/SVG_206.png" width="300"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This gives an introduction of using SVG within Power BI to create KPI shapes. There is lots more that could be done with SVG and this series will continue to add more features using svg.&lt;/p&gt;</description></item><item><title>SVG in Power BI - Part 1 SVG Basics</title><link>https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/</link><pubDate>Mon, 22 Apr 2019 17:23:04 +0000</pubDate><guid>https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/</guid><description>&lt;img src="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_102.png" alt="Featured image of post SVG in Power BI - Part 1 SVG Basics" /&gt;&lt;h2&gt;Series&lt;/h2&gt;
&lt;p&gt;This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;&lt;strong&gt;Introduction to SVG Basics&lt;/strong&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-2-kpi-shapes/"&gt;KPI Shapes in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-3-svg-icon/"&gt;Filling up with colour using SVG in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-adding-svg-text/"&gt;Using Text in SVG&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-part-5-svg-rotate/"&gt;Using SVG Rotate to create a dial in Power BI&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-6-icon-conditional-formatting/"&gt;SVG Icons in Conditional Formatting&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/svg-in-power-bi-7-using-theme-file-svg-icons/"&gt;Using a Theme to add SVG Icons&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="https://hatfullofdata.blog/power-bi-5-stars-svg/"&gt;Feb 2023 Update - 5 SVG Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This post introduces the very basics of SVG. If you already know SVG, move along to my second post in this series.&lt;/p&gt;
&lt;h2 id="svg-basics"&gt;SVG Basics
&lt;/h2&gt;&lt;p&gt;Before I get into the technical details of what SVG is, let me explain why SVG images are important. If you enlarge many image formats enough, they become fuzzy and pixelated. Because an SVG image is made up of lines and shapes defined by points, sizes, and colours, you can stretch them as big as you like and they stay sharp.&lt;/p&gt;
&lt;p&gt;SVG stands for Scalar Vector Graphics, which is an XML-based markup format that can contain two-dimensional vectors.&lt;/p&gt;
&lt;p&gt;Elements can be defined with an opening tag and a closing tag, for example &lt;code&gt;&amp;lt;svg&amp;gt;...&amp;lt;/svg&amp;gt;&lt;/code&gt;, or in a single self-closing tag, for example &lt;code&gt;&amp;lt;rect ... /&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="example"&gt;Example
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Red circle drawn with SVG basics" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="596" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_101.png" width="597"&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;http://www.w3.org/2000/svg&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0 0 100 100&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;cy=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;50&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;r=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;40&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;red&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The above example defines an area where the top-left is 0,0 and the bottom-right is 100,100. It contains a red circle with center at 50,50 and radius 40.&lt;/p&gt;
&lt;p&gt;If an SVG statement contains more than one element, they are layered with the first item at the back and the last item at the front.&lt;/p&gt;
&lt;h2 id="svg-paths"&gt;SVG Paths
&lt;/h2&gt;&lt;p&gt;The previous example drew a circle, and you can draw rectangles with &lt;code&gt;&amp;lt;rect ... /&amp;gt;&lt;/code&gt; as well. The next step from SVG basics is drawing more complex shapes. For this, you need to define points, curves, and arcs. One method is the path element.&lt;/p&gt;
&lt;p&gt;In a path element you can move the pen, draw lines, arcs, and curves. Below is a simple example that draws a green triangle.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;http://www.w3.org/2000/svg&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;0 0 100 100&amp;#39;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;M10 90 L50 10 L90 90 Z&amp;#39;&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;green&amp;#39;&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="svg-icons"&gt;SVG Icons
&lt;/h2&gt;&lt;p&gt;Lots of icons available on the web are written in SVG and many can be downloaded. Be aware of copyright and always give credit where credit is due.&lt;/p&gt;
&lt;p&gt;If you have PowerPoint you can insert icons onto a slide and save as a picture, which gives you SVG code.&lt;/p&gt;
&lt;h2 id="svg-resources"&gt;SVG Resources
&lt;/h2&gt;&lt;p&gt;This has been a very short introduction to SVG. There are plenty of resources to assist in composing SVG creations.&lt;/p&gt;
&lt;h3 id="w3schools"&gt;&lt;a class="link" href="https://www.w3schools.com/graphics/svg_intro.asp" target="_blank" rel="noopener"
 &gt;W3Schools&lt;/a&gt;
&lt;/h3&gt;&lt;p&gt;W3Schools is a great resource to get started in SVG. The reason I return again and again is the Try It Yourself button, which gives a simple place to test your SVG.&lt;/p&gt;
&lt;p&gt;&lt;img alt="W3Schools Try It Yourself screenshot" class="gallery-image" data-flex-basis="673px" data-flex-grow="280" height="692" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_102.png" srcset="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_102_hu_6e1169d6c0ac6e00.png 800w, https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_102_hu_6d19297e6de5465e.png 1600w, https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_102.png 1942w" width="1942"&gt;&lt;/p&gt;
&lt;h3 id="jenkov"&gt;&lt;a class="link" href="http://tutorials.jenkov.com/svg/index.html" target="_blank" rel="noopener"
 &gt;Jenkov&amp;rsquo;s SVG Tutorial&lt;/a&gt;
&lt;/h3&gt;&lt;p&gt;This is a great site for learning different parts of SVG and how it works, including videos.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Jenkov website screenshot" class="gallery-image" data-flex-basis="593px" data-flex-grow="247" height="1087" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_103.png" srcset="https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_103_hu_60e147487f113911.png 800w, https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_103_hu_7977bf676cff48d1.png 1600w, https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_103_hu_c4cf08309fe8b122.png 2400w, https://hatfullofdata.blog/svg-in-power-bi-part-1-svg-basics/svg_103.png 2690w" width="2690"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This was a brief introduction to SVG. It is a language worth understanding the basics of, and hopefully through this series you will find a new way to visualize your data.&lt;/p&gt;</description></item></channel></rss>