Indentation in Power BI Matrix report - powerbi

I am trying to indent the rows in matrix report in Power BI, Like shown in this image:
The requirement is not to group, just the indentation for few metrics. Is it possible in Power BI?

Use stepped layout https://learn.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual#stepped-layout-with-matrix-visuals
It is one of the many settings for the matrix visual and well documented in the Microsoft docs.

There is currently no simple way of indenting a few out of many items in one dimension.
The only option I see is to calculate a weird table on the form:
And then write a fairly complex measure leveraging ISINSCOPE to determine what value to pull for e.g. sales for Banana (but not the sum of Mango, Papaya et al.)

Related

Converting a Tableau report with different measures for each row to Power BI

I'm working on a project where we are converting a client from Tableau to PBI. One of the Tableau reports I'm converting looks like this:
Each row is a different calculation (measure). I can achieve a similar look, with regards to the column headers, in PBI by using a matrix. However, there isn't a way, that I know of, to apply a different measure for each row. The only way I can think of to do this is to create three matrix tables and stack them on top of each other. It won't look nearly as good but I can generate the same results. Does anyone have a better solution?
Put the Measure Names pill on Rows, Measure Values on Text and your date fields on Columns. That should give you when you want.

Power BI - How to have a calculated column and place it in a merged cell?

I am new to Power BI and with the limited time given, I am stuck at how to come up with:
Below Table B-Row1 ("1/20" and "M"-Monday cell) - how to
specifically place the date measures in their specific cell and put
it in one column?
How can I merge the cells under the Total column?
How to add all the numbers from the Type1 and Type2 columns and place it in the merged cell in #2?
Any clues/direction/links on how to achieve the Target Table B below will be much appreciated.
PS. Below Table A. Current is just using Matrix Visualization in Power BI.
You can't exactly do what you are after. PowerBI allows you to rapidly put amazing visuals together however that comes at the price of lack of (easy) flexibility. You could build your own custom visual or look in App Source for a visual that does this, or build the Visual in some other tool (via custom code).
However, I'd recommend sticking with the PowerBI matrix, which will give you a cascading drill down and work out how best to align your data to it and other out of the box visuals. Once you start to delve in to convoluted work-arounds to give users data in exactly the format they request you start to burn a lot of time. Look for alternatives to tell the data's story and work with your end-user to buy in to it.
Just wanna share that I have resolved my problem not using one type of visualization, but through using 3 different visualizations in Power BI. I used:
1 Table visual for Date column
1 Table visual for Total column
1 Matrix visual for the Code+Type mapping and counts
I also used DAX function to get the Date format and another DAX function used for both Total and Code+Type counts(to filter data according to the specified date).
Thanks for the response, #Murray and #RADO.

how to group the values in power bi?

I am trying to create a power bi replicating the tableau report. In tableau, it automatically group the values when we place the columns in rows pane. But in Power BI, I am not able to group the exact same way of tableau report. Please help me how to group the values in report pane of power bi.
I have tried table and matrix visualization but I am not getting the same view like tableau
Need to create the same visuals like tableau report. Attached images
As mentioned in this post, there is no exact visual copy of the Tableau visual you show for PowerBI. Instead, it offers the matrix visual where indentation is used to show groups. This, for instance, allows for a nice presentation of subtotals in your visual, something Tableau does differently. If you are really keen on getting the visual appeal closer alike, try changing the indentation under Formatting Options > Row Headers > Stepped layout indentation. That's the closest you are going to get given the current constraints of Power BI.

What's the difference between DAX and Power Query (or M)?

I have been working on Power BI for a while now and I often get confused when I browse through help topics of it. They often refer to the functions and formulas being used as DAX functions or Power Query, but I am unable to tell the difference between these two. Please guide me.
M and DAX are two completely different languages.
M is used in Power Query (a.k.a. Get & Transform in Excel 2016) and the query tool for Power BI Desktop. Its functions and syntax are very different from Excel worksheet functions. M is a mashup query language used to query a multitude of data sources. It contains commands to transform data and can return the results of the query and transformations to either an Excel table or the Excel or Power BI data model.
More information about M can be found here and using your favourite search engine.
DAX stands for Data Analysis eXpressions. DAX is the formula language used in Power Pivot and Power BI Desktop. DAX uses functions to work on data that is stored in tables. Some DAX functions are identical to Excel worksheet functions, but DAX has many more functions to summarize, slice and dice complex data scenarios.
There are many tutorials and learning resources for DAX if you know how to use a search engine. Or start here.
In essence: First you use Power Query (M) to query data sources, clean and load data. Then you use DAX to analyze the data in Power Pivot. Finally, you build pivot tables (Excel) or data visualisations with Power BI.
M is the first step of the process, getting data into the model.
(In PowerBI,) when you right-click on a dataset and select Edit Query, you're working in M (also called Power Query). There's a tip about this in the title bar of the edit window that says Power Query Editor. (but you have to know that M and PowerQuery are essentially the same thing). Also (obviously?) when you click the get data button, this generates M code for you.
DAX is used in the report pane of PowerBI desktop, and predominantly used to aggregate (slice and dice) the data, add measures etc.
There is a lot of cross over between the two languages (eg you can add columns and merge tables in both) - Some discussion on when to choose which is here and here
Think of Power Query / M as the ETL language that will be used to format and store your physical tables in Power BI and/or Excel. Then think of DAX as the language you will use after data is queried from the source, which you will then use to calculate totals, perform analysis, and do other functions.
M (Power Query): Query-Time Transformations to shape the data while you are extracting it
DAX: In-Memory Transformations to analyze data after you've extracted it
One other thing worth mentioning re performance optimisation is that you should "prune" your datatset (remove rows / remove columns) as far "upstream" - of the data processing sequence - as possible; this means such operations are better done in Power Query than DAX; some further advice from MS here: https://learn.microsoft.com/en-us/power-bi/power-bi-reports-performance

Can Power BI add range selection to a Line Chart?

I'd like to build a report with power BI line chart. For there are too many values on the X-Axis, I was trying to add a range selection on the X-Axis like what amChart does.
So, I'm wondering if power BI can do this.
Also, I want to add hyperlink to each value on the X-Axis to link to related shared folder, is it doable?
For time range selection, take a look at https://app.powerbi.com/visuals and try the Advanced Time Slicer visual. It might already do what you're looking for.
For the x-axis urls, you have several approaches you can try. The easiest approach is to have a related table in your report that shows the links. Then when a user selects a datapoint in your line chart, the table would update to show the relevant links. Alternately you might try to extend the Power BI line chart with your own logic. This might be hard since Cartesian charts are more complex than other charts. You can find the line chart code here: https://github.com/Microsoft/PowerBI-visuals/blob/master/src/Clients/Visuals/cartesian/lineChart.ts
Alternately you can just write your own purpose built visual that does exactly what you want. This might actually be easier than extending the Power BI chart. You can learn how to build your own visual by looking at our wiki: https://github.com/Microsoft/PowerBI-visuals/wiki
I was thinking about this more and wanted to mention one more solution. If you're looking to show the 'last n days' of data, instead of an arbitrary range, you can add a measure in DAX that returns the last days. I have an example here: http://blogs.msdn.com/b/lukaszp/archive/2015/08/08/finding-the-latest-date-in-power-bi-desktop.aspx