I'm visualizing a P&L statement, and want to add subtotals for the Total Revenue, Total Costs, Operational Income etc.
but I don't find an option to do so, which is readily available in Excels' waterfall chart.
You can either add a hierarchy to your dataset, for example on the axis you can have Year, Quarter, Month. If you drill up or down you will always get the values for this hierarchy level (Totals per Year -> totals per Quarter -> totals per Month). So a subtotal from the year level would be the Quarter view when you drill down.
Or you can add a measure to your dataset. Something like one of this two:
Count Orders = CountRows(GroupBy('YourTable';[OrderNumber]))
Sum Sales = Summarize('YourTable', [OrderNumber], "Sum Sales per Order", Sum([SalesValue]))
You can drag and drop now the measure into the tooltip section of your visual.
Related
I am trying to create an average measure that calculates/acts the same way as the Average line in the Clustered column chart does.
The avg calculated measure that I want to create should also be a straight line showing the average of the whole year and not on the monthly level as it does now. I cannot get it to ignore the month context like the built-in average line function for column chart.
This is what I have tried:
Avg. Quantity:=AVERAGEX(VALUES(Dim_Time[Year]),[Quantity])
and then place it in the Clustered column with lines chart in the line area values box. As you can see on the picture it doesn't produce the same result.
How would the dax logic need be written to replicate the same reslut as the built-in average line function ?
Best regards,
Rubrix
The core problem is the average measure you have written is being filtered by the month axis on your chart. You have to tell the measure to ignore that filter. Change cal[Month] to whatever your x-axis column is.
avg line = AVERAGEX(
ADDCOLUMNS(
SUMMARIZE(
ALLSELECTED(cal[Month]),cal[Month]),
"#qty",CALCULATE([Quantity])),
[#qty])
I made a condensed P&L within a PBI matrix showing Net Revenue, Gross Profit, Operating Profit, and EBITDA in the rows, while the columns show the months. The values of the are taken from a list of locations and their corresponding P&L amounts. I want to add a row at the bottom of my matrix chart showing EBITDA Margin for each month, which is just EBITDA divided by Net Revenue. Let me know if there is more information I can provide.
Thank you.
I have a dataset with columns Country, State, City, Sales. I wanted to build a drill down bar chart to drill from country to State and then City, showing the average sales. My problem is that I can't find a workaround to avoid power bi calculating the average as the average of the inmediate lower heirarchy. Since I have States with much more cities than others, when I get to category Countries, the averages are wrong, because Two States with different amount of cities are weigthed the same way when summarizing to the upper level.
Is there any way to define the granularity level on which averages should be calculated or any other workaround.
Example
example dataset
For country A, I want to show the average as 16.
Currently is doing the average between States X and Y, whose averages are 17.2 and 13, giving 15.1 as a result.
Any help on how to solve this problem will be preciated. Thanks.
avgMeasure:= CALCULATE(AVERAGE(tbl[sales]),ALLEXCEPT(tbl,tbl[country]))
In Power BI I am working with a matrix that shows a daily percentage.
When I add a column subtotal this sub total is summing up all the percentages for the selected days.
What I would like is that the Column sub total is showing the average percentage over the selected days.
Picture of the matrix
Thanks a lot for looking at my issue
Depends on how you calculate the percentage itself and on what granularity it exists in your data model, but you might want to play around with the ISFILTERED formula. Not sure what the name of the dimension ranging between 1 and 6 is in your graph, but let's call it day number. You can then do something like:
IF(ISFILTERED(day number), SUM(daily percentage), AVERAGE(daily percentage))
This checks if the daily percentage is filtered by the day number in the visual (matrix) or not. If it is, then it just takes the sum of the percentage (which is the percentage itself for any given day), otherwise it'll calculate the average percentage.
I have a matrix that has two row's dimensions- one for the country, and one that shows different KPIs. Then I have two dimensions for columns - one with the product name and one with the product logo. Basically all KPI's for each country broken down by product:
What I need to have is a total for each row, e.g. total KPI1 for all products, then total KPI2 for all products and so on.
However, when I go to the formatting tab and turn subtotals to be ON, it appears in this way:
It gives me a total for each product separately which is basically the same number. Is there any way to have only 1 total for the whole row?
Go to Format > Subtotal and turn on Per column level. Then you can specify which levels you want to show subtotals for below that toggle.