How to create time series visualisation in power BI - powerbi

I'm new to Power BI online but trying to create a time-series chart with sum of sales by month, year and split by country. My result is:
What am I doing wrong?

With the Line chart visual selected put the Date hierarchy on the X-axis, Sales on the Y-axis and Country on the Legend field.

Related

How to display quarterly data in Power BI

I have a Power BI report with a Date (slicer) visual like that.
In a Data Model there is a tabel 'Date' that corresponds to this visual.
At the moment there are only Day, Week, Month and Year dimensions in date selection options. But I would like to see that there is a Quater option too. If I select all date options in 'Date' table then the Power BI doesn't add a Quater option to the previous list but constructs a new visual with different styling (the weekday and month names are in estonian).
The Quarter field in 'Date' table is created like this:
Quarter = Quarter('Date'[Date])
So, my question is why Power BI doesn't add automatically a quarter option to the dropdown menu and are there any solutions for that problem?
Try detectimg column as a date in BI Editor or you may create duplicate column of date to see quarter options.
You can acheive this my selection "Filter" Visualization and drag drop the qtr, month etc in field section.

seeing sales data by "WEEK' in power bi

Can you help me figure out how to display sales data by "WEEKS" in power BI visuals ? I have a calendar table and the date hierarchy is listed by Year, Quarter, Month and Day with no week option.the visual I'd like to create is the chart at the bottom of the image I have attached Thanks
You need to add in the Week to your calendar.
If your are using DAX there are a number of ways
To show the week number of the year use WEEKNUM
Week No = WEEKNUM(Table1[Date], 2)
For the start of the week in a date format use
Start of Week = 'Calendar'[Date] - WEEKDAY('Calendar'[Date],2) +1
The equivalent functions in Power Query are Date.WeekOfYear and Date.StartOfWeek

Display year,quarter,month and day Charts based on the selected Date

There are four line charts for Year,Quarter,Month,Day in my power bi report. the requirement is to pick a date from the date picker and based on the selected date I need to display graphs accordingly(selected date and 3 values back). E.g. if user select 1.1.2018 from date picker, I need to display graphs with year,quarter,month,day belong to 1.1.2018 and 3 more values(years,quarters,months,days) back.
I add visual level filters for each line chart and filter top 4 values.but it's work for year chart only. any ideas?
Dashboard_1
Dashboard_2
Data
Hey Dasaru try to create separate columns for year, quarter, month & date and use that as Axis in each chart
FYYear = Sheet1[Period].[Year]
FYQuarter = Sheet1[Period].[Year]&" "&Sheet1[Period].[Quarter]
Apply the same solution for Month and Date.

Show last 12 months of data on a bar chart according to the slicer choice

my issue is as below:
I hava a Calendar table with dates and Orders Table related to the Calendar table by DateID. I have slicer that allows user to choose month and year from a Calendar table so that the data will be shown only for the choosen month but on one bar chart i would like to show sum of orders by month (so month will be on X-axis) from Orders table not for one month but for the last 12 months where the last month is the one from the slicer. E.g. if user chooses 06-2107 from slicer then the bar chart should show orders data from 07-2016 till 06-2017. Obviously when the slicer and bar chart interact with each other i can see only one month.
I've tried to create a measure in DAX but I failed and the results are not what i expect. If the description is to messy i can provide the pbix file as an example

Calculate revenue by week - sunday to saturday (last year) on tabular cube/Power BI

I have a report on Power BI where data comes from a tabular cube. The DAX expressions are made in the cube. When drilling down in Power BI and comparing results to the original numbers there is a slight difference. Power BI calculates the week figures as monday - sunday, but I want it to show from sunday - saturday
Initial code:
IF(ISBLANK([Revenue]), BLANK(), CALCULATE([Revenue],SAMEPERIODLASTYEAR('Date'[Date]),ALL('Date'[Date])))
The date table in cube contains columns [SortFiscalWeek], [SortFiscalMonth], [SortFiscalYear], [Week Commencing],Fiscal Week Number.
Week Commencing is in accordance to Sunday (being the week commence date) - Saturday.
The sort fiscal columns start as 1 from years ago and end to whichever number it is today based on today's date.
I added Fiscal Week Number as I thought it might be helpful and tried using it as Test New Users LY = IF(ISBLANK([New Users]),BLANK(),CALCULATE([New Users],SAMEPERIODLASTYEAR('Date'[Date]),FILTER(ALL('date'),'Date'[Fiscal Week Number]='Date'[Fiscal Week Number]&&'Date'[YearInt] = 'Date'[YearInt]-1)))
EDIT
In Power BI I am using a Clustered Column Chart with Date Hierarchy in the Axis and Revenue in the Value. On week level it sums the Revenue as Monday-Sunday and not Sunday-Saturday. Hope this clears up some doubt as to how i am using the data in Power BI
Can anyone help?
If I understood well, I had the same problem, I created a calculated column giving me the name of the month, like this:
MonthName = SWITCH(DimDate[Month], 1,"gennaio",2,"febbraio",3,"marzo",4,"aprile",5,"maggio",6,"giugno",7,"luglio",8,"agosto",9,"settembre",10,"ottobre",11,"novembre",12,"dicembre","altro")
then I needed to order the month by month number, so to do this you need to select your calculated column, and then go to the tab Modelling>Sort by column, in this menu you can choose on which field of the table you order the selected field.
Hope that helps.