Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Daviejoe
Memorable Member
Memorable Member

Hi @Anonymous 

 

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#M607150





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

Proud to be a Super User!




Anonymous
Not applicable

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.

amitchandak
Super User
Super User

@Anonymous , 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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.