Skip to main content

Posts

Showing posts from October, 2020

Data Entry Options in Power BI

Where do you go when you need to create a simple support table in Power BI? I usually prefer the Power Query Editor and use 'Enter Data' option. But what other options do we have? Would you like to find out? Then you've come to the right place! Other than Power Query Editor, we also have options in DAX to create a support table, and I am going to look into them one by one. Let's say I want to create a support table for color codes that I use in my report. First I am going to do it with Power Query Editor. After clicking 'Enter Data' at Power Query Editor, we get a new window where we can edit cells like in Excel. I use this option most of the time because it's easy to do some changes later, from source settings. So how do we do the same thing in DAX? To have exactly the same table by using DAX, we need to click on 'New Table' on Power BI Desktop and write the formula below:  Well, it's not "exactly the same". Power BI gave default colum...

Concatanate Like a Pro

When we need to concatenate two strings into one in Power BI, the first option that comes to mind is CONCATENATE or CONCATENATEX. While CONCATENATE works with columnar based structure, CONCATENATEX is an iterator function, needing a table to iterate row by row. But actually, we have a new player in the game since 2017 and it is called COMBINEVALUES. Hence it's a relatively new function, it's not used as much as the others, and that's why I have decided to write a post about it. First let's try to concatenate without using any function, only with the ampersand operator.           And this is the output :          As you see it's pretty simple, there is no room for surprise. Before doing the same thing with CONCATENATE, let's check the syntax first: CONCATENATE(<text1>, <text2>) A s you see, it accepts only two arguments. To concatenate multiple columns we can either write the function with the ampersand operator (&) a...

Everything About Images

Lately, I have needed an image displayer for my Power BI report and I have decided to do a little research before I choose which one to use.  After all, Power BI offers many of them at App Source, and the more choice I have, the pickier I become. Here is the full list of image displayers that I could find, and they are all free. Table and Matrix:  These are between the options that let me display a visual on Power BI's visualizations pane. The advantage is they come with Power BI. You don't need to download anything from App Source and they support URL. It supports links to images and also images encoded to Base64 code. They might be preferable because they don't have the risk of simply disappearing as they are Power BI's own tools. It's possible to change the size of images but it's not possible to fit image 100% to the frame. When I tried to small the frame, they both created a scroll down menu which doesn't look good. Changing the size is also has limits ...

Incorrect Map Locations

One of the things I like about Power BI is, it supports geospatial visualizations. Map and Filled Map are built-in visualizations we can use if we need a visual with geographic coordinates. But it's not perfect, like everything else, it has some issues. I will explain the issue that I have faced and of course the solution to it. On the map, I visualize sales by city and France is filtered. Despite France is filtered, it shows some cities in the USA. In the beginning, I didn't understand what caused it, but later I have noticed that both countries have cities with the same name and that's the reason for my problem. Somehow, Power BI can't decide which city I meant to see despite I filter by country and shows all the cities with the same name on the map.   The first solution is using latitude and longitude data, but of course, if you have it. I had that data and it solved my problem but I am also going to explain what to do if you don't have latitude and longitude dat...