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

Recursivity Month

Hello All,

 

I need your help concerning an issue, I have a total by month and I need to compare new tickets for each month here below an exemple :

 

Count ticketsMonth YearDifference 
100503-20190 
100202-20203 
100001-20215should be 2 : comapring to last month and not the Max Month

 

I need to find 0 then 3 then 2 and not 5 !!!
a recursive way !

Any help will be appericated 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Yes thanks, I found it, I need a calendar table and this is the measure :

NBR-1 = CALCULATE([NBR],
KEEPFILTERS('Calendar'[Date]))-
CALCULATE([NBR],
PREVIOUSMONTH('Calendar'[Date]))

View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Anonymous 

you need to have a date column.

Column = 
VAR _next=MAXX(FILTER('Table','Table'[Month Year]<EARLIER('Table'[Month Year])),'Table'[Month Year])
var _nextvalue=maxx(FILTER('Table','Table'[Month Year]=_next),'Table'[Count tickets])
return if(ISBLANK(_nextvalue),0,_nextvalue-'Table'[Count tickets])

pls see the attachment below





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

Proud to be a Super User!




Anonymous
Not applicable

Yes thanks, I found it, I need a calendar table and this is the measure :

NBR-1 = CALCULATE([NBR],
KEEPFILTERS('Calendar'[Date]))-
CALCULATE([NBR],
PREVIOUSMONTH('Calendar'[Date]))

amitchandak
Super User
Super User

@Anonymous , You need a month year in YYYYMM format first

new columns

Month Year 1= right([Month Year],4) & left([Month Year],2)

 

now create a column

new column =

var _max = maxx(filter(Table, [Month Year 1] <earlier([Month Year 1]) ),[Month Year 1])

return

[Count Ticket] -maxx(filter(Table, [Month Year 1] =_max ),[Count Ticket] )

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
Anonymous
Not applicable

Hello,
Thank you for your reply

I tried it but not working I have an error 😞

Taddi10_0-1632903835659.png

Have you an Idea please?

 

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.