Power BI matrix visual totals - matrix

I have the following matrix:
I do not need last column of Totals for "+/-" and cannot get rid of it using formatting tools. Is there a way to show in Totals the revenue total only?
I tried Format visuals every single option provided there with no success. For instance - on column subtotals - "apply settings to: "; "per column level" does not offer particular column, there is only "all" option.

Related

DAX Measure displaying values only for certain combination

setting up a SSDT in Visual Studio where I have masterlist with prices and 3 addtional attributes. These 3 attributes (Region, Customer, Material) can be used to to link the data to the other table with all the sales information etc.
Target: Showing the prices in a pivot if the 3 attributes are fulfilled and are matching to the other table with the same attribute combination. Assuming a calculated column is not solving the problem as this cannot display the price values in the value section of the pivot.
enter image description here
Please help me to find an appropriate DAX measure to link the data and show the prices for the matching attribute combination.
Thanks in advance :)
Masterlist with attributes which can be used as a key to connect to the other list?

Swapping rows and columns in a matrix in Power BI

I want to analyse the sales of a certain company in Power Bi. I have a customer dataset with nine columns (gender, city, age range, hair colour etc.) and one million records. Now I want to put those columns in a matrix. For instance:
Rows: Gender
Columns: Age Range (<16, 17-20, 21-25 etc.)
Values: Number of Sales
I present this dashboard towards some people and I want to 'play' with the data. What happens if I change the rows to 'hair colour' for instance. Is there a way to do this without using bookmarks? In one sentence: swapping rows and columns of a matrix while you present the dashboard and cannot use the option 'Fields'? Or at least point me in the right direction? It would really help me. Thanks in advance!
Unfortunately, the quickest way to do this is using the Fields pane. The only other option that is available would be Bookmarks, but I guess you have already tried that. I guess you are an option similar to the one available in "Pivot Charts" where you can "Switch Rows/Columns" with the click of a button. That option is not available in Power BI at this point, as far as I know.

Oracle Reports (6i): Get difference of two items from two different queries (Multi Query Report)

I have an Oracle 6i report with Two Complex Queries (Q1 and Q2) connected by Data Link. The report was developed by some other developer who is not available now. Multiple columns are being displayed in report.
Q1 has a column Total_Issuance and Q2 has a column Total_Consumption. I have to display their difference on report. I am using a formula column to get the difference and then binding a display field to this formula column to show on report.
But since the formula column is outside both the queries, I am getting following errors.
REP-1517: Coloumn 'CF_1' references column 'Total_Issuance', which has incompatible frequency.
REP-1517: Coloumn 'CF_1' references column 'Total_Consumption', which has incompatible frequency.
Just like the formula column is outside both queries, create two additional summary columns (outside of both queries):
cs_tot_iss, which will sum total_issuance
cs_tot_con, which will sum total_consumption
Now modify formula column so that its source are newly created summary columns, e.g. let it
return :cs_tot_iss + :cs_tot_con;
As of paper layout: you don't have to display cs_tot_iss nor cs_tot_con (as you already have those values via total_issuance and total_consumption), just add formula column.
Create a new calculated field to the query that is the detail query (I asume it's Q2).
In this calculated field you can simply use:
return :Total_Issuance - :Total_Consumption;
to calculate the difference.

Rank only for latest month

I've a calculated field "Total Revenue" which blends revenue from multiple data sources in Tableau.
Based on this field (aggregate field) on monthly basis, I would like to show only TOP 5 items with highest revenue as of latest month.
As shown in above table, items have to be filtered out (as they are TOP 5 in March) based on revenue data as of the latest month (March). How can this be achieved using RANK()? I'm not able to rank only for latest month as formulated below because it shows error as I cannot mix aggregate and non-aggregate functions.
IF DATETRUNC('month'),ReportDate)=//March 1st date given//
THEN RANK(Total Revenue)
END
My solution is a kind of workaround but seems to be working:
Create a calculated field with below formula:
IF DATEPART('month', {MAX([date])}) = DATEPART('month', [date])
and DATEPART('year', {MAX([date])}) = DATEPART('year', [date])
THEN
[revenue]
ELSE
0
END
The {MAX([date])} part on the code gets the maximum date in your data, it is fixed with { and } characters so that the value is not effected by the filters, date partitions etc. If you want the sorting month to be the one we are in then you should change that part with NOW()
Now we have a value containing only the sum of the latest month and we can sort our visual with this Measure.
You can drag your new measure (I called my measure: 'last month revenue') to the details and right click your item pill on the Rows, sort it by your new field.
And finally drag your item to the filters and go to Top tab, make filter your data according to sum of "last month revenue" measure.
Below screenshot shows the excel data and the final Tableau table:

Adding new row in Crosstab Crystal Report

I would like to know if it is possible to add/place a row within a crosstab report.
For example, I am making a Profit and Loss Report using Crystal Reports 2011 for SAP. I would like to add a row below "Cost of Goods Sold Total" where I can place a row for Gross Profit which will be calculated from Income Total - Cost of Goods Sold Total.
(see attached image)
Let me know if this is possible. Any help appreciated.
For anyone who is facing a similar problem, I found a solution.
1) Right-click the 'Row' with the title '2' > Select Calculated Member > Insert Row. You should see a new Row with zero values below the row '2'.
2) Right-click the 1st blank space below '2' and select Calculated Member > Edit Header formula and type in:
"Gross Profit"
3) Then, right-click one of the zero values in the row and select Calculated Member > Edit Calculation Formula and use this code:
GridValueAt(GetRowPathIndexOf(1), CurrentColumnIndex, CurrentSummaryIndex) -
GridValueAt(GetRowPathIndexOf(2), CurrentColumnIndex, CurrentSummaryIndex)

Resources