PowerBI Matrix Organizing Columns - matrix

I'm new to PowerBI, but I'm learning by looking at .PBIX files and trying to see how everything was built, but also watching YT videos. Recently I've been trying to manipulate data so I can have stacked columns that look much like this: Metrics: SPC Quantity > GP > Net Sales Region: YTD CY, YTD PY, YTD VAR%.
Unfortunately, this is where I end up: Metrics: SPC Quantity > GP > Net Sales Region: SPC Quantity > GP > Net Sales. And if I drill down a column I get my desired result, but I can't drill it down on all the Metrics, only one: Drilled Column. It feels almost like I'm missing the most simplest thing that will get my desired result, but I can't figure it out for the life of me.

Related

Excluding a Metric from a Visualisation Filter

I am a new user to MicroStrategy Developer and am stuck with a task that I want to do. I have created a table visualisation and applied two filters to the visualisation via the visualisation filters:
Top 10 Rank by Volume Filter
A current month Filter
My table has the following table headings:
Region
Sales Person Name
Sales Volume
Average Sales Volume To Date
I want the table to display the Current Months values for the 1st three columns and then the last column to display the average sales volume to date (based on 2 years worth of data). However clearly Average Sales Volume is not working correctly, I am assuming this is due to the Month filter applied to the visualisation.
Being a new user to MicroStrategy, I am not sure how best to get round this? Is there a way of making the Average Sales Volume To Date metric independent of the Date filter applied to the visualisation? Or a better way to build this without applying visualisation filters?
Any hints or tips would be much appreciated.
Thanks!
I am not very sure whether this works out but you can give it a try.
Create the "Average Sales Volume To Date" metric as a level metric and set the filtering as Ignore.

Total less available = Remaining Formula in Power Query

I have a bunch of statistical data that I have chopped up and pieced together in power query. In looks like there is category missing from the Database. To fill in the gaps I am trying to take the grand totals which are correct (red), subtract from that what I know to be correct, with the remaining numbers giving me my answer (orange).
The correct data starts with I1, I2, I3, I4, so possibly a grand total of these, by state.
At the moment this is filled by the following formula in excel;
=E53-SUMIFS($E$5:$E$44,$B$5:$B$44,B45,$C$5:$C$44,C45,$D$5:$D$44,D45)
Any help with how the heck I can do this in power query. I realise I cant use the same formula but any ideas would be much appreciated. I can change the text in red to total if that helps in some way?
Thanks
Here's one potential way. If you start with your spreadsheet set up similar to this:
I only used a subset of your StateIDs from your example and generated my own Values for this example. And the figures in the Available column would be from your red section.
Then add the table from the spreadsheet to Power Query (in Excel, you would click on the table and then Data > From Table/Range > Select My table has headers and click OK).
In Power Query:
You'll probably have to change the TimeID type to date if you want to use the dates for anything, because it will probably come in as date-time type--I won't use the dates here though, so you could skip changing the type (otherwise, right-click the TimeID column > Change Type > Date)
Then use Group By to aggregate values and set the stage for the calculation you want (select the StateID > Group By > and setup the groupings like below and click OK)
You should see something like this:
Then add a new column with your calculation (Add Column > Custom Column > Set it up like below and click OK)
You should see something like this:

dax handling summary values in a matrix report

Source data columns are Store, Product, StoreSales, and ProductSales
StoreSales has duplicate values, even across different Stores.
Looking for a dax measure to handle StoreSales as described in the image.
This is the closest so far, but doesn't account for duplicates between stores.
Store Sales:=
sumx(DISTINCT(_Sales[StoreSales), _Sales[StoreSales])
screenshot of source and pivot table
To answer your question directly, this formula should give you the desired result:
Desired Result for Store Sales =
IF(ISFILTERED(_Sales[Store]), SUM(_Store[Store Sales]))
However, I recommend to revisit your data model design. It's conceptually incorrect (you are mixing detailed data with the summary of the same data), and you will have serious problems with DAX. A better way to structure your data:
Remove column "Store Sales". It's redundant and does not fit the data level of detail.
Rename column "Product Sales" into "Sale Amount". It's just sale amount, without any qualifiers.
Create a measure "Total Sales" = SUM(_Sales[Sale Amount]). It will correctly calculate total sales both on product and store levels.
If you need a special measure for store sales, use SUMX:
Store-level sales = SUMX (VALUES(_Sales[Store]), [Total Sales])
And if you need to show product contributions to store sales:
Product Contribution = `DIVIDE([Total Sales], [Store-Level Sales])

Columnar report in Tableau

I'm new to Tableau. I'm using Tableau Desktop Professional 10.0.15. I need to write a very simple report that does not use any visualization.
Here's a example of the layout (the numbers are made up):
Web Site 1 North America Europe
Total Hits 3,523,483 3,523,483
Sessions 1,248,234 1,248,234
Unique Visitors 1,809,392 1,809,392
New Visitors 383,932 383,932
% new 10.9% 10.9%
Avg Page Views per user 1.9 1.9
Web Site 2 North America Europe
Total Hits 3,523,483 3,523,483
Sessions 1,248,234 1,248,234
Unique Visitors 1,809,392 1,809,392
New Visitors 383,932 383,932
% new 10.9% 10.9%
Avg Page Views per user 1.9 1.9
The users want the measures to be in one column, but they're not the same measures. Some measures need to be formatted as percentages. The average should have 1 decimal place. I have a feeling it's not possible to format the same measure differently in Tableau. Ideally, there would be something like a banded report where I could stack the measures on top of each other. But, I don't see a way to do that in Tableau. I could create a table in my database and put the measures in the same field and add the formatting in the database (which feels wrong), but it would have to be text (to have '%'). But, Tableau won't treat a text field as a measure. Also, it seems like if you don't add a measure, Tableau will insert a fake measure and put 'Abc' as the value (at least, I think that's why I'm getting these 'Abc' columns in my reports that I didn't add and that aren't in my data).
It seems like Tableau wants you to do something like this:
Unfortunately, this is not what my users want. Any suggestions?
In Tableau it's possible to put many measures in a single column using the measure names in rows.
To do this, add to filters shelf the dimension called Measures Names (the last one). Select all the Measures you'd like to show (Hits, Sessions, Visitors, Views, etc.). Then, drag this dimension to the rows shelft. Next, drag the measure called Measures Values (the last one too) to the marks shelf, specifically in the text box. You can also add other dimension to rows shelft (like website) to the left of Measures Names. This will show a table similar to your requirement.
By default, the Measure Values are SUM of each measure. Just right click on them and select the aggregation you need (AVG, COUNT or other).
Finally, you can format each measure as you want, right click a measure value, and select Format...

Business Objects XI Web Intelligence Aggregation Issue (11.5.8.897)

I've got a multiple tabbed report. On one tab I have the details listed and on another I have a summary table (cross reference) type of aggregation based on the same dimensions utilized in the detail report. I've created a calculated field that takes the product of two measures, I've saved this as a variable. When I try to aggregate that variable on the summary report BOWI is not calculating correctly. Example:
QTY * PRICE = LineTotal
2 * 3 = 6
4 * 3 = 12
TotalOrder = $18
Calculates correctly on the detail report.
When I put this on the aggregate report it is doing the following:
Sum QTY * Sum Price = Total, in other words it is doing
6 * 6 = $36.
My totals on the aggregate are highly inflated. Firstly in what world does that order of precedence make sense? and secondly how can I tell BOWI to sum the TotalOrders instead of breaking it back up into it's components summing those and then multiplying?
Is it a bug?
Further Information
The detail report is Sectioned by Year, Region, State -> Detail lines
The summary report is dimensioned by Year, Region, State
The (QTY * PRICE) component is saved as a variable and utilized in both places.
Am I missing the secret handshake somewhere when calculated fields/variables can't be aggregated and they need to do so in the Universe?
I havent worked with WEBI for a while, I mainly develop DESKI reports, however what you describe sounds similar to the aggregation that occurs in DESKI. If a measure is set to sum aggregation, then it will add all the measures together that relate to the dimension that is added to the report.
For example, if like my details reports, you have the columns order number, qty, price then the aggregation will sum both qty and price at the order level, which is correct. However moving to the summary table then this will cause incorrect data.
To remove the aggregation you can change it from SUM to NONE, I cant recall off the top of my head on how to do this in WEBI (if you cant find out I can check my course materials which are work).
Alternatively, it is best to ensure the dimensions on your summary report are suitable for the data presented.
If you need any further information please let me know.
Matt

Resources