How to change aggregation on Power BI - powerbi

I'm trying to find the option to report sum of sales by month and country in data in Power BI.
At the moment the package defaults to count of sales and it reports like this:
I want change it so the chart reports and splits out the country.

On the Visualizations pane select the dropdown arrow on the Sales parameter and then switch from Count to Sum:

Related

how do i arrange the months of the year in chronological order using power BI service

I'm working with power bi service, I want to visualize a monthly data but the months of the year aren't arranged in chronological order, how do i fix this
The dataset you're using in Power BI service must be edited to sort the month names by month number. This is a data modeling issue, and you cannot achieve your goal purely through service reporting tools. You did not specify what type of data source you have. Since Power BI Desktop is the data modeling tool for Power BI Service, I have explained how to do this with Power BI Desktop.
The best method is to create a calendar table and relate it to your fact table. Here is an article on creating one with DAX. In your calendar table, you should have a column containing the ordinal month number (1-12) and the month name. I like one column with the month short name (Jan, Feb, Mar...) and one with the month long name (January, February, March...). For each of the month name columns, select the column in the field well, in the app menu, select Column Tools > Sort by column and choose the month ordinal number column to sort the name column.
If you have a fact table with just month names in it and you want to do something quick and dirty, you can create a month ordinal number column on the fact table and sort the existing month name column by that.
Month Number = MONTH(DATEVALUE(YourTable[YourMonthNameColumn] & " 1, 2022"))

Power BI: How to Create a Matrix with Row Headers = Data label, Column Headers = Measures

I have a dataset consist of two time series: e.g. Historical stock prices for Apple and Microsoft. And I have a few different power BI measures created for each of these two stocks (e.g. Weekly Return, Monthly Return).
I want to create a "Matrix"-like visual, to show:
stock names as the row headers
measures as the column headers
values being the corresponding measure value for the given date selected on a date slicer
To illustrate what I want to do, please see the picture from Excel as an example. Is there a convenient way to do this in Power BI?
Thank you very much for your help!
Excel illustration on what the visual should look like in Power BI

Change Slicer Value in dropdown monthly to quarterly in power BI

I have a Power BI report in which i want users to select "Period Type" in drop down. and when they chose values like Monthly or quarterly it should dynamically change the slicer values to monthly or quarterly.
example is given below.
When Period Type Is Selected To Montlhy
https://pasteboard.co/IYuYSO2.png
When Period Type Is Selected To Quarterly
https://pasteboard.co/IYuYcVw.png
And i have data set with DimDate Table and FactSales Table. Both are joined Table with One to Many relationship.
Your question looks tailor made for a visual from the marketplace. Check the following link out:
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380786?tab=Overview
This slicer will let you choose the frequency and then your slicer will change to reflect that. You can download this from the marketplace. If you have not done this before, you can do this by selecting "Import from marketplace" option after clicking on the 3 dots at the end of the Visualization tab. Hope this helps.

How to Calculate Average in DAX

I am building Analytical solution and need to calculate - Average Number of Users accessed reports per day in Power BI (DAX)
The best way I think is to add a Measure Right click on table > Add measure:
'MesaureAvg
AVERAGE('YourTableName'[ColumnName])
Then put in a visual in your PowerBI report with MeasureAvg and the Date column.

how to get monthly and yearly totals using dax

I'm kind of new to the power bi. I want to calculate the monthly yearly totals from the column Amount and TRD_date column. Please see the below data
The solution does not require DAX. You can do this easily in Power Bi Report Desktop. Just follow these steps:
Step 1- create a new Report and on a blank report, click the Table visual (show highlighted in yellow below)
Step 2- Bring in your datasource and drag over to the Values area of the visual, the Date column first, then the Amount column second. Your values will look like:
Step 3- Remove (click the X) for the Date-> Quarter Value and Date-> Day value. This will total the amounts for you by Month and Year.
Your table will be a shown below:
My data is shown here for reference: