{"id":5135,"date":"2020-04-20T13:22:08","date_gmt":"2020-04-20T13:22:08","guid":{"rendered":"https:\/\/www.stl-training.co.uk\/b\/?p=5135"},"modified":"2023-12-30T23:03:42","modified_gmt":"2023-12-30T23:03:42","slug":"make-your-data-dynamic-with-power-bi-what-if-analysis-pt1","status":"publish","type":"post","link":"https:\/\/www.stl-training.co.uk\/b\/make-your-data-dynamic-with-power-bi-what-if-analysis-pt1\/","title":{"rendered":"Make your data dynamic with Power BI \u201cWhat if Analysis\u201d Pt1"},"content":{"rendered":"<h3>Why use What if?<\/h3>\n<p>Have you ever wanted to quickly demonstrate how your data changes in different scenarios? The What if parameter in <a href=\"\/sharing\/stl-power-bi-training-2019\/91\">Power BI<\/a> is a powerful tool that allows you to do just this, by dynamically transforming your data.<\/p>\n<p>For example, maybe you want to know how much your profits will increase if you raise your price by either 2%, 4% or 6%? Or show the effect of spending more money on marketing? If you know the correlation between price, marketing and profit, you can quickly compare these scenarios and ensure you make the right choice when making critical business decisions.<\/p>\n<h3>How do I use What If?<\/h3>\n<p><strong>The scenario:<\/strong><\/p>\n<p>Imagine you want to visualise how the sales total will change if you sell more units. 5%, 10%, or 15% more.<\/p>\n<p><strong>Step 1:<\/strong> Use a matrix to visualise the sales total for each product. Click <em>New Parameter<\/em> on the Modelling tab, which will open the What-if parameter dialog box. Type a name and data type, in this example the data type will be <em>Decimal number<\/em>. Type a minimum, maximum and the incremental changes, in this example 0.05 (5%) and click <em>OK<\/em>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-5136\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/Powerbi-1-1024x689.png\" alt=\"Example of Power BI what if parameter\" width=\"525\" height=\"353\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/Powerbi-1-1024x689.png 1024w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/Powerbi-1-300x202.png 300w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/Powerbi-1-768x517.png 768w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/Powerbi-1.png 1327w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<p>This will insert a new table, called a <em>parameter table<\/em>, in your Power BI file and a slicer on your report page.<\/p>\n<p>If you have a look at the new table in Data view, you will see the values.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-5138\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi2.png\" alt=\"A new table in data view on Power BI\" width=\"866\" height=\"374\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi2.png 866w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi2-300x130.png 300w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi2-768x332.png 768w\" sizes=\"(max-width: 866px) 100vw, 866px\" \/><\/p>\n<p>And if you look at the report page you will see the slicer. Try dragging the handle across and see how the value will change from 0% to 15%.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-5139\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi3-300x175.png\" alt=\"Slicer in what if analysis\" width=\"300\" height=\"175\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi3-300x175.png 300w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi3-768x448.png 768w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi3-1024x597.png 1024w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi3.png 1235w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Create a measure you can use to visualise the percentage changes of the quantity.<\/p>\n<p>Start by multiplying the price with the quantity, and then multiply with 1 plus the selected value from the increase quantity table (the parameter table).<\/p>\n<p><strong>Increase quantity =<\/strong><\/p>\n<p><strong>SUMX (<\/strong><\/p>\n<p><strong>\u00a0\u00a0\u00a0 tblsales,<\/strong><\/p>\n<p><strong>\u00a0\u00a0\u00a0 [Quantity] * [Price] * ( 1 + &#8216;increase quantity'[increase quantity Value] )<\/strong><\/p>\n<p><strong>)<\/strong><\/p>\n<p>By adding the measure to the matrix you can now see how it will change the total sales if the quantity increase with 5%, 10%, or 15% &#8211; <strong>simply drag the slicer across.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-5140\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi4-1024x496.png\" alt=\"Final product of what if tool\" width=\"525\" height=\"254\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi4-1024x496.png 1024w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi4-300x145.png 300w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi4-768x372.png 768w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2020\/04\/powerbi4.png 1211w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<h3>Conclusion<\/h3>\n<p>Here you have learnt to create a quick and easy What If parameter for dynamically transforming your data in Power BI. Read Part 2 to learn how to personalise your parameter further to give even more powerful insights, or check out our <a href=\"\/ao\/71\/microsoft-power-bi-training-courses-london-uk.html\">Power BI training page<\/a> to find out how you can learn even more skills in this amazing reporting tool!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why use What if? Have you ever wanted to quickly demonstrate how your data changes in different scenarios? The What if parameter in Power BI is a powerful tool that allows you to do just this, by dynamically transforming your data. For example, maybe you want to know how much your profits will increase if [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,8],"tags":[],"class_list":["post-5135","post","type-post","status-publish","format-standard","hentry","category-hints-tips","category-microsoft"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/5135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/comments?post=5135"}],"version-history":[{"count":1,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/5135\/revisions"}],"predecessor-version":[{"id":5145,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/5135\/revisions\/5145"}],"wp:attachment":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/media?parent=5135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/categories?post=5135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/tags?post=5135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}