Split column in two with Power BI desktop - powerbi

My table has the following structure:
I need to analyse the variance of views by page title from the periods in column B: 2016 vs 2015.
For that, I'm using Power BI desktop. I'm trying to split column B in two: one with the period 1/jan/2015-19/ago/2015 and other with 1/jan/2015-19/ago/2015
Is this possible to do? How?
I tried unpivoting but it didn't work.
Thanks in advance for helping!

If I understood your need correctly you might be able to achieve your result with your same data without the need to split your columns:
Insert a Clustered Column Chart visual.
On the "Axis" field of the visual drag your "Title" column.
On the "Legend" field of the visual drag your "Dates" column.
On the "Value" field of the visual drag your "Views" column and then select "Variance" on the dropdown for "Value".
This should compare the variance of the number of views for each of the pages between the 2015 and the 2016 period.

Related

How to remove the empty rows in the table in PowerBI?

Hi all,
I have a table in PowerBI as shown in the screenshot above. I want to remove the rows in the table where column D is empty. So in the example above, the rows that should be removed are row7,8,9,10. In Power Query Editor, I'm only able to remove the rows if the entire row is empty.
May I know how should I remove row 7-10 in PowerBI? In future, if the data for row 7-10 in column D are available, then it will be restored back. Is this possible to achieve? Any help or advice will be greatly appreciated!
You can do as #Jeroen Mostert mentioned in his comment, within Power Query, or if you are just trying to display the table as a table visual in Power BI like this...
...then you could just filter the table visual by the column with blanks within Power BI without doing anything in Power Query.
To filter the table visual:
select the table visual
then, in the Filters pane, find the section about your column named Final, and then select "is not blank" from the drop-down selection below "Show items when the value"
then click Apply filter.
This screen snip shows the table visual selected and the Filters pane visible with "is not blank" selected in its drop-down.

Slicing the power BI report only by slicers not images

I have a scenario where I am using date and country slicers along with maps in my report along with some stacked charts.
When I click on the map for one country it filters the data based on that country I have selected but the filter is not reflected in slicers.
Is there any way that I can use the map only to display the counts without having select, in other words, no selection allowed on the maps?
Any suggestions would be helpful.
Thanks!
Go to Format tab and select Edit Interaction option as shown in the below image. Now select your Map visual and set Filter = None in other visuals you don't like to interact when click on the Map.

Hierarchy label customization - Power BI

I have a Clustered column chart in Power BI which has a category and date on the Axis so that there's a hierarchy to view the data on. In the hierarchy view, each column in the chart has the full hierarchy name below it. I would like to have the category name once only and then the dates for each column specified instead of the dates and category name with each date repeated. So I would like for the hierarchy labels to have their own "grouping" as it were. Is anyone able to assist with this please? I don't want to pivot the data because then there's a legend that viewers of the report need to look at to see what color column matches up to which date in the chart which isn't practical.
If anyone does run into this I ended up using the Infographic Designer custom visual that I imported from the Power BI Marketplace. With this I was able to achieve what I wanted by using the "Column By" feature of the visual. This gave me multiple charts for the different groups of data I wanted to view.

Creating Date Relationship in Power BI for Slicers

I'd like to slice across visuals based on dates in MS Power BI (i.e., one filter for say month will slice all visuals for that time period.
I created a date table from http://www.agilebi.com.au/power-bi-date-dimension/ to link to the date columns in each table.
I connected xlsx workbook.
Image of columns in Power BI
I added tried to edit the relationship so connect the 2 date columns. However, when I insert the filter using the date_table as values and try to use it, the visuals disappear.
Visuals are Gone
However, when I create the slicer and slice across multiple visuals, they go blank.
**I tried changing the type to "Both" but it didn't fix the problem.
The script at AgileBI.com.au creates a date table with a 'Date' field that has a data type of text. You can (surprisingly) do a relationship between 2 fields of different data types and not get an error. However, a join between a text field that contains dates, and a regular date field will mean that rows that look like they should match up do not.
You can confirm this is happening by picking a value in the 2 tables that you think should match up and seeing if they are identical. In my case, I had Tuesday, November 01, 2016 in my imported table, and 11/1/2016 in the other table. While they both represent the same date (in the US), they clearly look different. A good place to see this is in the Edit Relationship screen (and it definitely would have been helpful to include a screenshot of that in your original post).
Anyway, if the dates in your table don't match up to the corresponding (text) dates in the Date table, then when you filter to "2016" on your slicer, the visuals will all go blank.
I would recommend:
Click Edit Queries
On the left hand side, select the table of dates (called Invoked Function by the script)
Click on the header for the Date column (it will likely already be selected)
Select Transform on the ribbon
Change the Data Type from Any to Date
Click Home > Close & Apply
Hope this helps.

Filter a table by column name in sas enterprise guide

How to use a column as a filter for a table in sas enterprise guide?
Example:
Got a column consisting of personal IDs and want that column as a filter on my table with information about ALOT of people.
Hope you can help me.
I am not sure what version of SAS EG you are using, but here are the screenshots for SAS EG 5.1
start building a basic filter in query wizard
click on the drop down triangle for the filter value
select "columns" tab
select the actual column
make sure "Enclose values in quotes" is not ticked
Hit finish