Foramtting date in Smart Narrative PowerBI - powerbi

just wondering if you have any idea how I can make the date change to April 2019 instead of Monday, April 1, 2019? this happens when I generate a smart narrative in PowerBI.
Expetected result: Last year's Revenue had two low anomalies on April 2019

Related

how to subtract months giving a specific criteria

hi I have a rolling last 12 months in excel but I would like to exclude specific months so that way it will skip does months on the report. but the formula that I have wont work for every month. the months that I would like to skip is march 2020, april 2020, may 2020, june 2020. I have a drop list I which it will subtract the last 12 months.
enter image description here

Showing last 4 values based on filter Power Bi

I have some Retirement fund data which I visualize with scatterplots and bar charts.
I am filtering the data with a Year slicer and a quarter filter (and fund type, but this is not relevant).
In my report I have 6 visuals, 4 of which are quarterly data, and two are yearly data.
I am using a bar chart visual to show certain values like the following:
My visual shows Quarter data for the selected Year. ( for example: it shows the invested equity per quarter for the year 2018)
However, for 2019 only 3 quarters are yet recorded.
Is it possible (for 2019) to show 3 quarters of 2019 and the last quarter of 2018 so that my bar chart still shows 4 quarters?
If so, could i make it so that the year is also visualized on the x axis so that one may not get confused as to what year the quarter is from? (i.e. show Q4 2018 and Q1, Q2, Q3 2019)
The best option is to have a current month indicator in your calendar table, which then counts back and forward in time. This example is based on Power Query and has current month and years/quarters/months ago. So for example March would be 0, Feb would be -1 etc.
You could also use something like in DAX as a calculated column:
Months = DATEDIFF([start],[end],MONTH)
with the Start being NOW() and the end the date in your calendar table
When the report refreshes it will recalculate the months ago and filter the visual so it will always correctly show the current Nth months you select. You could also use TOP, but if the calendar has dates in the future it might return those.
The top visual displays the unfiltered visual, the bottom with the 'Months ago' of 0, -1, -2, -3

How to add Hours to Date Hierarchy in Power BI

I have managed to create another Hierarchy with year, month, day, and hour
but it does not work as I wanted
I created a table that has Days and hours and linked it to my table.
The "Go to the next level in the hierarchy" does not accumulate for that period
i mean in that case I should get January for all years but what I get is Jan 2017, Jan 2018, Jan 2019
it act exactly as "Expand all down" button
Is there any way I can simply add Hours to the Date hierarchy
Create a calculated "hour" column in the fact table, for example,
Hour = TIME( HOUR( [AVHandoverHour] ), 0, 0 )
And, add it to the visual axis.

How can I select last two dates in Power BI?

I have list of dates 1st Nov 2018 to 9th Nov 2018. Now in Power BI I want to compare data of last two dates 8th Nov 2018 vs 9th Nov 2018.
I have tried putting date column in visual filter so that I can choose max two dates, but date filter is now appearing in that filter.
Kindly help
After adding the date column to the Visual level filters, you can change the Filter Type to Relative date filtering and specify is in the last 2 days.

Windows/c++- Date subtraction (week/month/year) using boost

How can I subtract a length-of-time from a boost gregorian date?
Let's say I construct a date as follows:
boost::gregorian::date Today(2012, 02, 13);
I would like to do Today - N weeks from Today - N Months from Today - N years and get a valid date after subtraction.
To get one week prior to today, just use
today - weeks(1)
To get the previous month you can do.
today - months(1)
But the same day of the previous month might not exist. For example, if today were March 30, there is no February 30th, but boost will "snap" to the end of the month in the case of March 30 - months(1) and give you Feb 28th (or Feb 29th in leap years).
The classes are all part of the boost::gregorian namespace.
I think you want the Date Iterators, described here: http://www.boost.org/doc/html/date_time/gregorian.html#date_time.gregorian.date_iterators