cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Select Month of year

Hello everyone. I'm here again asking for your help.
I have a question for you.
I have the following report with the headings of the months of the year which are descriptively but linked to the numbers of the months (1,2, etc).

tarz_0-1603371320230.png
For now I take the current month for example December and the previous month for each year in this example November. I would like that given two years, for example 2020 and 2019, I can take for the previous year, and only for that, only the month with the largest number.
To make you understand better: data two years 2020 and 2019, I now take December and November 2020 and December and November 2019. I would like to take December and November 2020 and December 2019.
Of course, the choice of months can change, it is not always November and December but it can also be January and February together

 

Best regard

 

3 REPLIES 3
Highlighted
Super User IV
Super User IV

@tarz , one way is you create a trailing year measure and use that.

example

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Super User I
Super User I

Hi @tarz 

 

I think you need to be a bit clearer on what you are asking for. 

 

Have you imported your data into Power BI yet?

Have you tried to create the view you are looking for?

 

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M6071...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted

Hello @Daviejoe and @amitchandak
Yes, I have already created the view via direct consultation and in the consultation I take today's year and the previous year, both today's year and the previous year took two months, one month of reference and the previous month. But what I want is to take only today's month and the month before today's year and today's month of the previous year
Type: 2019 month 2, 2020 month 2 and 1 to understand.
I thought of two ways to do this, either through the power bi view, for example, with a measure, or through consultation, but I don't know how to do it.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors
Users online (645)