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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.