Author: seth bauer

  • New Layout – One

    New Layout – One

    This layout continues to deliver fantastic visual guides to make your reports look top notch. This layout utilizes buttons for navigation without locking in the position in the layout background. We also really like how this layout uses the theme templates to change the background header color to anything you would want. The semi-circle that indicates which page you are on is a free form image and can be changed around if you want to re-arrange the pages. Our branded layout gives you 5 pages of fun, while our unbranded version throws in 10 pages and includes all 10 background .png image files to make your report building even easier.

    Features of this report

    • Free documentation provided by PowerBI.Tips included on the Report Features page
    • 10 pages of different layouts – Unbranded
    • 5 pages with navigation built with buttons in the report (Easily swap out a different background)
    • 10 PNG images of all the backgrounds to use in this report or others – Unbranded
    • Navigation dot – included icon image for complete flexibility
    • Customizable top ribbon (color of buttons and background header are can be altered with themes)
    • No PowerBI.Tips Branding on any of the main report pages – Unbranded
    One – Capabilities

    Get a feel for all the page layouts and interactions available in this report by using the below example we’ve embedded via Power BI.

    Sample of report

  • The Dynamic Time Matrix

    The Dynamic Time Matrix

    Time and time again when I begin talking with Excel users and ask to see what current reports they are using, they usually show me a table with a mixed bag of columns split by different time ranges. A comparison of month over month, or year over year, mixed in with a few daily totals or cumulative totals all rolled up from values on other tabs to produce their preferred view (or dashboard). Typically, the first approach I take is to describe how we can break up this single table view of things and start looking at the aggregations of these values in easily digestible pieces and slice and dice them in different times ranges. I’ve explained that the goal should be to produce easy to consume visuals for comparison using measures and plotting these out in different ways to glean insights quicker. Most of the time, this works, but other times… it is second best to what the analyst or uber Excel user wants to see… they want to see their numbers, and they want to see them the same way they have them in Excel.

    The Challenge:

    Recently, I encountered this all too familiar scenario (Time Ranges in a table/matrix) except this time, I wanted to see if I could reproduce the output exactly as the end user wanted it rather than move them in a different direction.

    The first group of columns showed the days in the current week, the second group showed the weeks in the current month, followed by the Months to date, a year to date column and static columns of a Goal and Forecast.

    I’ll spare you the details of researching a better way than producing these as individual measures,  and suffice to say that I was able to come up with a solution based on a few calculated columns, a disassociated table, and a single measure to produce the output I was searching for.

    The Solution:

    The above screenshot is of the dynamic matrix that you can download from the link at the end of this blog. As I developed this solution it came to my attention that there are actually a couple ways we could build this solution. The first of those would be to have a time slicer drive all the different time ranges, this would be useful for analyzing older datasets in the different ranges, but my goal was to create a solution that follows the “Set it and forget it” train of thought. This solution will restrict the view of data to never exceed the current day, the neat thing is, the current day is when you read this blog, not a static point in time. I’ve pre-loaded data out to the end of 2020, so the sample should continue to work and change each time the file is opened.

    Before we dig into things, I want to convey that the DAX dove a bit deeper into the weeds than I initially expected, and I’ll do my best to describe what I did and why.

    The Data

    Sample Data

    I’ve modified my original solution to use a sample of Adventure works data that I created, this simple dataset consists of a column to group things by (ModelName), a date (StartDate) and the value to aggregate (ListPrice). This solution should cover a wide range of different use cases so don’t get hung up on the exact columns here. A grouping column, a date column and a value column are all you need.

    Here are the steps I took after creating the dataset and loading it into Excel:

    Load Data table from Excel into Power Query, Close & Apply

    Create a calculated date table (DAX):

    Date = 
    VAR MinYear = 2018
    VAR MaxYear = 2020
    RETURN
    ADDCOLUMNS (
        FILTER (
            CALENDARAUTO( ), 
            AND ( YEAR ( [Date] ) >= MinYear, YEAR ( [Date] ) <= MaxYear )
        ),
        "Calendar Year", YEAR ( [Date] ),
        "Month Name", FORMAT ( [Date], "mmmm" ),
        "Month Number", MONTH ( [Date] ),
        "Weekday", FORMAT ( [Date], "dddd" ),
        "Week Number", WEEKNUM([Date]),
        "Weekday number", WEEKDAY( [Date] ),
        "Quarter", "Q" & TRUNC ( ( MONTH ( [Date] ) - 1 ) / 3 ) + 1
    )

    Your MinYear / MaxYear will obviously be different, but the core columns for what we need are in this output.

    Add Calculated Columns

    Now we need to add some filter columns to the date table we just created in order to get the current time frames we care about.

    IsInCurrentYear = if(YEAR(NOW())= [Calendar Year],1,0)
    IsInCurrentMonth = if([isInCurrentYear] && MONTH(NOW())=[Month Number],1,0)
    IsInCurrentWeek = if([isInCurrentYear] && WEEKNUM(NOW())=[Week Number],1,0)
    

    Create a Disassociated table (Dax Table)

    This is our grouping table, this is the first key element in which we create a series of different DAX calculated tables to create the different time range groups we want to roll up our aggregate amount by. In each case, we are pulling all current and previous years, the current months in this year to date, the current weeks in the current month and the current days in the week. Then we union those values together where the “Group” is the top level time range, and the value is the specific time range values. Then we add an index column so that we can order the values in the way that we want.

    The final output should look something like this:

    This is the DAX code to create the calculated table. Each “Summarize” creates the time groups and values rolled up for the particular time range we are interested in. This is wrapped in the “AddColumns” function to add in a workable index that allows us to order all the values in the correct order dynamically. Initially, the static Index column works to sort the Group column, but the dates won’t sort as Calendar dates so I added the second way to dynamically generate an index to sort the values by. I retain the original Index value and ensure the counts returned from the date table align in sequential order. Essentially retaining the Group/Value index to sort by. Then we wrap all that in “SelectColumns” so that we can specify the column names. If we didn’t do this, the first column name would be “Calendar Year”.

    TimeRange = 
    SELECTCOLUMNS(
    UNION(
        ADDCOLUMNS(
        SUMMARIZE(FILTER('Date', 'Date'[Calendar Year] <= YEAR(NOW())), 'Date'[Calendar Year], "Group", "By Year", "Index", 4),
            "DayIndex", CONCATENATE(4, FORMAT(CALCULATE(COUNT('Date'[Date]), ALL('Date'), FILTER('Date', 'Date'[Calendar Year]<=EARLIER('Date'[Calendar Year]))),"000"))
                ),
        ADDCOLUMNS(
                   SUMMARIZE(FILTER('Date', 'Date'[Month Number] <= MONTH(NOW()) && 'Date'[Calendar Year] = YEAR(NOW())), 'Date'[Month Number], "Group", "By Month", "Index", 3),
            "DayIndex", CONCATENATE(3, FORMAT(CALCULATE(COUNT('Date'[Date]), ALL('Date'), FILTER('Date', 'Date'[Month Number]<=EARLIER('Date'[Month Number]))),"000"))
                ),
        ADDCOLUMNS(
                   SUMMARIZE(FILTER('Date', 'Date'[IsInCurrentMOnth] = 1 && 'Date'[Week Number] <= WEEKNUM(NOW()) && 'Date'[Calendar Year] = YEAR(NOW())), 'Date'[Week Number], "Group", "By Week", "Index", 2),
            "DayIndex", CONCATENATE(2, FORMAT(CALCULATE(COUNT('Date'[Date]), ALL('Date'), FILTER('Date', 'Date'[Week Number]<=EARLIER('Date'[Week Number]))),"000"))
                ),
        ADDCOLUMNS(
            SUMMARIZE(FILTER('Date', 'Date'[IsInCurrentWeek] = 1 && 'Date'[Date] <= NOW()), 'Date'[Date], "Group", "By Day", "Index", 1),
            "DayIndex", CONCATENATE(1, FORMAT(CALCULATE(COUNT('Date'[Date]), ALL('Date'), FILTER('Date', 'Date'[Date]<=EARLIER('Date'[Date]))),"000"))
                ),
                   DATATABLE("Header", STRING, "Group", STRING, "Index", INTEGER, "DayIndex", INTEGER,
                       {{"Goal", "Overall", 5,0}, {"Forecast", "Overall", 5,0}})),
        "Value", 'Date'[Calendar Year], "Group", [Group], "Index", [Index], "DayIndex", [DayIndex]
    )
    

    Create a relationship between the Date table and the Data Table

    This would be on ‘Date’[Date] and ‘Data’[StartDate]

    Create our Measures

    Now we need to take the grouping table and merge it with the aggregated value via our measures. In the Data table we want to create the following measures.

    First Measure:
    List Price = SUM(Data[ListPrice])
    
    Second Measure:
    TimeValue = 
        VAR Val =
        SWITCH(SELECTEDVALUE('TimeRange'[Group]),
            "By Year", CALCULATE(TOTALYTD([List Price], 'Date'[Date], FILTER('Date', 'Date'[Date]<= TODAY())), FILTER('Date', 'Date'[Calendar Year] = VALUE(MAX('TimeRange'[Value])))),
            "By Month", CALCULATE(TOTALMTD([List Price], 'Date'[Date], FILTER('Date', 'Date'[Date]<= TODAY())), FILTER('Date', 'Date'[Month Number] = VALUE(MAX('TimeRange'[Value])) && 'Date'[Calendar Year] = YEAR(NOW()))),
            "By Week", CALCULATE(SUM(Data[ListPrice]), FILTER('Date', 'Date'[Week Number] = VALUE(MAX('TimeRange'[Value])) && 'Date'[Calendar Year] = YEAR(NOW()) && 'Date'[Date]<= TODAY())),
            "By Day", CALCULATE(SUM(Data[ListPrice]), FILTER('Date', 'Date'[Date] = DATEVALUE(MAX('TimeRange'[Value])))),
            --Remove SWITCH below if you only want time range
            SWITCH(SELECTEDVALUE(TimeRange[Value]),
               "Goal", [List Price] * 1.2,
               "Forecast", [List Price] * RAND() 
                )
        )
        RETURN
            FORMAT(Val, "CURRENCY")

    Create the Matrix

    Create a Matrix visual and drop the columns into the following rows and columns:

    You will have something that looks like this:

    Dynamic Time Matrix First Level

    Are you ready for the magic? Head over to the far right of the visual and click down on the “Expand all down one level in the Hierarchy” button ->  and BOOM!

    Dynamic Time Matrix Complete

    We have our fully functional time range matrix that will adjust dynamically based on the current day. No need to update, change or alter anything! I hope you enjoyed this tip, I certainly was excited to put this solution together. There are so many different ways you could alter this solution, using different dates (swap in fiscal calendar dates), add different final total or percentage columns at the end, my mind keeps coming up with new solutions, and I hope you can use this as well!

    You can find the full solution in this PBIX download which includes the sample data set.

    If you like the content from PowerBI.Tips, please follow us on all the social outlets to stay up to date on all the latest features and free tutorials.  Subscribe to our YouTube Channel, and follow us on Twitter where we will post all the announcements for new tutorials and content. Alternatively, you can catch us on LinkedIn (Seth) LinkedIn (Mike) where we will post all the announcements for new tutorials and content.

    As always, you’ll find the coolest PowerBI.tips SWAG in our store. Check out all the fun PowerBI.tips clothing and products:
    Store Merchandise

    After many requests, we are now selling out layouts unbranded so that you can use them in all your business applications. Be sure to check out our first offerings and stay tuned for more to come in the future. Learn more about Layouts.

  • 2019 Microsoft Business Application Summit Retrospective

    2019 Microsoft Business Application Summit Retrospective

    This year the Microsoft Business Application Summit (MBAS) was held in Atlanta Georgia. Despite some travel snafu’s (3 rebooking’s and 9 delays), we made it into Atlanta late the night before the preconference sessions. Which was good, because we were presenting one!

    (A special thanks to Adam Saxton (Guy in a Cube) who went way out of his way to pick up a bunch of materials we needed for the preconference. If you don’t follow Adam and his awesome Power BI channel, be sure to check it out -> YouTube Link Guy in a Cube)

    Our “Data visualization with Power BI” preconference session was packed with 180 people and we had a fantastic time showing people how to build no-code custom visuals with the new “Charts” http://charts.powerbi.tips/ (Gallery here: http://gallery.powerbi.tips/) tool based on the Microsoft Research team that developed Charticulator, how to create themes and layouts and many other tips and tricks. The good news for all our followers on powerbi.tips is that we have that content created now and we will be sharing that over time in the form of blogs and other training materials posted to the site.

    We each individually had the opportunity to spend some quality Q&A time in the Community Lounge with some great one on one time with many of the conference goers. And we finished off the whirlwind tour with the final session time of the conference where we presented the “Microsoft Power BI: Data visualization best practices”. Here is our session from the conference.

    Here is a detailed video of the creation of the custom ribbon chart at the end of the session:

    Link to Session BRK 3023 on YouTube

    All the sessions of MBAS can be found in the Power BI Community Video Gallery

    Top Takeaways:

    The best part of any conference is the people you meet. The social aspect and meeting new people are one of the most important aspects of any conference event. We hope all the attendees at MBAS made some great new connections, we know we did!

    It is an exciting time to be in the business of data, and the MBAS conference has merged in Dynamics with the Power Platform tools. The keynote by James Phillips brings to light Microsoft’s next steps in the evolution of how these tools are transforming businesses, and the future is bright indeed. Be sure to check out his Keynote

    Power BI is still on a rocket ship of greatness. The roadmap is exciting, the community is growing bigger and better every day, and more and more businesses are leveraging the tool to change the way their users interact with data on a daily basis.

    Our Favorites:

    Of course, our favorites all revolve around the tool we love, Power BI! An absolute must watch video is the road map session that outlines the near term features that are going to amaze you

    Link to road map session

    We’re huge fans of Power BI dataflows, so of course we recommend those sessions. Here is a Great Overview and explanation dataflows.

    Want more information on dataflows, check out these sessions from the conference.

  • New Layout – Square One

    New Layout – Square One

    “Square One” utilizes the color theme as a background component that adds a pop of accent color only. This gives you the end user the maximum flexibility to incorporate color themes that match your needs without drawing to much attention on the main part of the page. Click here to download

    The icons are part of the background so that the colors come through with the icons, but this also keeps the same flexibility in that if you have different icons, you can always place those behind the clear buttons placed on the report. We’ve only tied in 3 of the icons to buttons and bookmarks as the others can be added by you as you develop and build out the report.

    The idea behind the icons on the right follow two different thought patterns.

    First, a Summary, more granular, and then table views of data. In this vein, you would create a clear bookmark to re-direct to the different pages showing that level of information.

    Second, would be to create toggles on each page to view visuals in current state vs. over time and use the icons to flip between the two.

    Let us know your thoughts on this new layout idea, we hope you get a lot of use out of it!

    Sample of Report:

  • New Layout – Smooth Operator

    New Layout – Smooth Operator

    Hey everyone! We’re excited to release our latest layout “Smooth Operator”. Click here to download.  We’ve gotten some great feedback from our users and the previous layouts were a bit heavy handed as we tried to create a perfect experience with adding visuals. The difficulty of trying to link up a dataset to the x/y axis made some of those a bit burdensome. As a result, we’re going to streamline the layouts to be super easy to use but yet still providing as much enhanced value with bookmarks, areas for visuals, and using json themes to change look and feel of background and visual elements.

    We’re interested in your thoughts on this streamlined approach, so please let us know how you like the new layout – and expect more like it in the future!

    Sample of Report:

  • Respect Layers

    Respect Layers

    If you are like me and you like making your reports look extra good with different visual elements you’ve probably come across the issue before where you use shapes or images layered behind a visual. What you have quickly discovered is that an end user can mistakenly click on that background layer and the entire object pops from the background to the foreground. In this quick tutorial, we’ll show you how to STOP this from happening! We learned the technique through a webinar given by Miguel Myers and wanted to make sure we spread the word because it will have a huge impact on how we can build reports!

    Be sure to follow:

    If you like content from PowerBI.Tips please follow me on all the social outlets to stay up to date on all the latest features and free tutorials.  Subscribe to us on YouTube.  Or follow me on the social channels, Twitter and catch up with me on LinkedIn where I will post all the announcements for new tutorials and content.

  • New Game – aMAZEing DAX

    New Game – aMAZEing DAX

    If you haven’t had your mind melted over the past few games that Phil Seamark has developed here is one more, aMAZEing DAX.  This month’s game is a Gauntlet styled game that uses SVGs, and some fun DAX to allow you to navigate through a maze.  Game play engine developed by Phil Seamark, and Graphics Design by Seth Bauer.

    Play the game below, or hit this link for the full screen version:

    To download your own copy of this game follow this link.

    If you liked this game Check out these other great games:

    To read about how this game was built jump on over to Phil’s blog post.

  • Power BI Dataflows: Change is Coming

    Power BI Dataflows: Change is Coming

    I have been holding on to a copy of Satya Nadella’s book “Hit Refresh” for quite some time. With all the Power BI goodness, the job, etc.… I just hadn’t gotten around to it. However, it made its way into my bag on a recent flight and I found it to be an exceptional story and a very clear view into how Satya plans to take Microsoft into the future. You might say he “open sourced” his plans. After reading this and comparing it to what I’ve been hearing and seeing regarding the fundamental changes in culture and products coming out of Microsoft, I think I’m in a familiar group of those that say he appears to be an exceptional leader who has the talent, vision, and focus to achieve the goals he has set out for himself and Microsoft.

    The main three focus areas for the direction of Microsoft according to Satya revolve around Mixed Reality, Artificial Intelligence (AI), and Quantum Computing. It is important to understand this direction, because it can provide insight into the changes we see in product suites and what future these changes might hold. Setting aside Mixed Reality and Quantum Computing for the moment, we’re already being exposed to how AI is starting to augment Power BI. The latest announcements at PASS Summit revolve around exposing AI delivery mechanisms to business users via Automated Machine Learning features to gain even deeper insights. The work to introduce AI automatically into the tool is already present in features like Explain the Increase/Decrease, Quick Insights and Q&A. Innovations in bringing AI into reporting and analytics is going to continue to change how we look at information in a future that is much closer than I think many are prepared for.

    With the book in mind I was also doing a lot more study in architecture and design in the Azure ecosystem and strengthening my understanding of how the modern data platform is built and can expand to support multiple business needs. Without getting too involved, the overall gist of what I’m seeing is that the process of data ingestion, movement, transformations and storage are being made easier. The 2nd generations of the initial services are being rolled out and the suite of services are starting to do a large part of the heavy lifting in some of the most challenging areas. As a result, these services have a greater potential for wider adoption and becoming a large part of newer modern solutions. In addition, after tying all the services together from source to analytics I started to see a specific service that could be considered the hub for all this analytics activity. Azure Data Lake Storage Gen 2. This service is certainly being positioned as the main storage entity and seems to hold the architectural location as the de facto place where both Enterprise and Business are being funneled for interaction. Data cleansing, machine learning, warehousing, event hubs, etc., etc. can all pull/push from Azure Data Lake Storage Gen 2, and these interactions and manipulations are being made easier with each release.

    Taking what we understand about the overall goals of Microsoft, the centralization around a hub data and activity begins to not just make sense, but be a pivotal part of enabling future objectives to grow and be accessible to every business. Getting “All” of your business data in a single location for analysis will allow you to leverage current and future services to enhance and make use of AI and other technologies quickly, more efficiently and at a much lower cost.

    Power BI Dataflows is the first step in integrating the business into this ecosystem. Power BI Dataflows leverage a familiar product in Power Query, to connect to many sources and perform Extract, Transform and Load operations. They allow flexibility to map data to existing data entities and create new entities that have the potential to streamline and consolidate data silos. These objects that are the result of data flows are stored as CDM folders in Power BI.

    CDM Structure
    CDM Structure

    Two main things to hit here: First, a CDM folder consists of a CSV file for your data, and a model.json structure for metadata definition. Second, “in Power BI” means Azure Data Lake Storage Gen 2 behind the scenes, Microsoft just creates it for you so you don’t need it as a separate service if you aren’t using it for anything else.

    Where this new feature gets exciting is when it is used with your own Azure Data Lake Storage Gen 2. Power BI can connect to your existing Azure Data Lake Gen 2 storage instead and the CDM folders will be put there. This brings the business user into the Enterprise space and allows IT, Data Scientists and business users to collaborate in a single data repository. In addition to the above, we’ve already heard earlier this year that all of Dynamics and now 3rd party line of business and collection tools like SAP and Adobe will also plug into the Azure Data Lake Storage Gen 2 using the CDM folder structure. This means data will be constantly being added to the entities themselves. Power BI Dataflows offer up a unique opportunity to bridge some of the widest gaps that exist between business and IT in the data space.

    CDM Architecture
    CDM Architecture

    For more details on how to use data flows be sure to check out Matthew Roche’s video here -> https://www.youtube.com/watch?v=0bJpCVj3JfQ

    And for the full technical details, take a look at the “Power BI and Dataflows” Whitepaper here by Amir Netz -> https://docs.microsoft.com/en-us/power-bi/whitepapers

    In short order, to be at the top of the competition you’ll have to use Artificial Intelligence to be competitive and stay relevant, and I assume Mixed Reality is going to be a part of that as well. I would argue that what we are seeing here are the building blocks for that future and the efforts to adopt these services will allow us to make exponentially faster gains in analysis and decision making that will give businesses significant competitive advantages. Power BI is front and center in this endeavor as the analytics platform, and that should make any user of the tool excited indeed.

    The preview of Power BI Dataflows is out, based on how these pieces are falling into place across the board, and understanding the direction of Microsoft based on where the ship is being steered, I have a strong inclination that we’re going to be busy re-architecting solutions very soon and that platforms of services will allow businesses to make even more rapid innovations and advancements in their data journey’s. Power BI has already made for a fun ride, but this last month has me feeling like I may have just strapped a rocket to my back that is now being prepped for ignition.

    This is an opinion piece, and as such, I reserve the right to change my opinion as more information is learned. That being said, I’d love to hear feedback from you the reader if you have any on the subject.

  • Center the X-Axis on a Line Chart

    Center the X-Axis on a Line Chart

    Sometimes when your working on a line chart you want the x-axis to stay centered on a chart. This tutorial will walk you through how to create an X-Axis that will always center it’s self on the graph.

    Video Support Material:

    The measures discussed within this tutorial are:

    Variance All = SUM(Sales[Variance])

    The column name Variance is found in the data table called sales.  This is just a numerical column.

    After summing up all the variances we can calculate the min and max lines.

    Const Max Line = [Variance All] * 1.2
    
    Const Min Line = -1 * [Const Max Line]

    Finally to calculate the variance to date you can use this filtered measure, which will only produce historical values.

    Variance To Date = CALCULATE([Variance All], FILTER('Sales','Sales'[Date] <= EOMONTH(TODAY(),0)))

    Thanks for watching our short tutorial.  If you like this video please be sure to follow me (Seth Bauer) on Twitter, LinkedIn and be sure to subscribe to the PowerBI.Tips YouTube channel.

  • When to Use Publish to Web

    When to Use Publish to Web

    There are often questions surrounding Publish to Web.  What is it?  How can I use it to share my reports?  This video walks through the proper usage for Publish to Web and how to manage the Power BI tenant settings.

    Check out this video explaining the full details surrounding this topic:

    If you like this video please be sure to follow me on Twitter, LinkedIn and be sure to subscribe to the PowerBI.Tips YouTube channel.