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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
youssefm9
Helper I
Helper I

Calculating MoM % revenues per clients and total in a chart

Hello All,

I am trying to calculate the Net revenue retention and Gross revenue retention from the following table in Power BI.

In Excel I have inserted some formula.

I want to put it in a chart, showing the months in X-axis, and %growth in Y-axis.

What is the formula in PBI I can use, knowing the fact that I can select Client name and Months in the filters. 

 

Net revenue retention is the growth or degrowth vs previous month per client.

Gross revenue retention is the degrowth only.

 

Thank you.

 

ClientMonthRevenueNet Revenue RetentionGross Revenue Retention
Customer AJan-22100=IF(A2=A1,((C2-C1)/C1),0)=IF(AND(A2=A1, C2<C1),((C2-C1)/C1),0)
Customer AFeb-22100=IF(A3=A2,((C3-C2)/C2),0)=IF(AND(A3=A2, C3<C2),((C3-C2)/C2),0)
Customer AMar-22100=IF(A4=A3,((C4-C3)/C3),0)=IF(AND(A4=A3, C4<C3),((C4-C3)/C3),0)
Customer AApr-22105=IF(A5=A4,((C5-C4)/C4),0)=IF(AND(A5=A4, C5<C4),((C5-C4)/C4),0)
Customer AMay-22105=IF(A6=A5,((C6-C5)/C5),0)=IF(AND(A6=A5, C6<C5),((C6-C5)/C5),0)
Customer AJun-22120=IF(A7=A6,((C7-C6)/C6),0)=IF(AND(A7=A6, C7<C6),((C7-C6)/C6),0)
Customer AJul-22120=IF(A8=A7,((C8-C7)/C7),0)=IF(AND(A8=A7, C8<C7),((C8-C7)/C7),0)
Customer AAug-22115=IF(A9=A8,((C9-C8)/C8),0)=IF(AND(A9=A8, C9<C8),((C9-C8)/C8),0)
Customer ASep-22120=IF(A10=A9,((C10-C9)/C9),0)=IF(AND(A10=A9, C10<C9),((C10-C9)/C9),0)
Customer AOct-22120=IF(A11=A10,((C11-C10)/C10),0)=IF(AND(A11=A10, C11<C10),((C11-C10)/C10),0)
Customer ANov-22130=IF(A12=A11,((C12-C11)/C11),0)=IF(AND(A12=A11, C12<C11),((C12-C11)/C11),0)
Customer BJan-2210=IF(A13=A12,((C13-C12)/C12),0)=IF(AND(A13=A12, C13<C12),((C13-C12)/C12),0)
Customer BFeb-2210=IF(A14=A13,((C14-C13)/C13),0)=IF(AND(A14=A13, C14<C13),((C14-C13)/C13),0)
Customer BMar-2212=IF(A15=A14,((C15-C14)/C14),0)=IF(AND(A15=A14, C15<C14),((C15-C14)/C14),0)
Customer BApr-2212=IF(A16=A15,((C16-C15)/C15),0)=IF(AND(A16=A15, C16<C15),((C16-C15)/C15),0)
Customer BMay-2212=IF(A17=A16,((C17-C16)/C16),0)=IF(AND(A17=A16, C17<C16),((C17-C16)/C16),0)
Customer BJun-2211=IF(A18=A17,((C18-C17)/C17),0)=IF(AND(A18=A17, C18<C17),((C18-C17)/C17),0)
Customer BJul-2212=IF(A19=A18,((C19-C18)/C18),0)=IF(AND(A19=A18, C19<C18),((C19-C18)/C18),0)
Customer BAug-2212=IF(A20=A19,((C20-C19)/C19),0)=IF(AND(A20=A19, C20<C19),((C20-C19)/C19),0)
Customer BSep-2213=IF(A21=A20,((C21-C20)/C20),0)=IF(AND(A21=A20, C21<C20),((C21-C20)/C20),0)
Customer BOct-2212=IF(A22=A21,((C22-C21)/C21),0)=IF(AND(A22=A21, C22<C21),((C22-C21)/C21),0)
Customer BNov-2213=IF(A23=A22,((C23-C22)/C22),0)=IF(AND(A23=A22, C23<C22),((C23-C22)/C22),0)
Customer CJan-2290=IF(A24=A23,((C24-C23)/C23),0)=IF(AND(A24=A23, C24<C23),((C24-C23)/C23),0)
Customer CFeb-2290=IF(A25=A24,((C25-C24)/C24),0)=IF(AND(A25=A24, C25<C24),((C25-C24)/C24),0)
Customer CMar-2290=IF(A26=A25,((C26-C25)/C25),0)=IF(AND(A26=A25, C26<C25),((C26-C25)/C25),0)
Customer CApr-2295=IF(A27=A26,((C27-C26)/C26),0)=IF(AND(A27=A26, C27<C26),((C27-C26)/C26),0)
Customer CMay-2295=IF(A28=A27,((C28-C27)/C27),0)=IF(AND(A28=A27, C28<C27),((C28-C27)/C27),0)
Customer CJun-2295=IF(A29=A28,((C29-C28)/C28),0)=IF(AND(A29=A28, C29<C28),((C29-C28)/C28),0)
Customer CJul-2295=IF(A30=A29,((C30-C29)/C29),0)=IF(AND(A30=A29, C30<C29),((C30-C29)/C29),0)
Customer CAug-22100=IF(A31=A30,((C31-C30)/C30),0)=IF(AND(A31=A30, C31<C30),((C31-C30)/C30),0)
Customer CSep-22100=IF(A32=A31,((C32-C31)/C31),0)=IF(AND(A32=A31, C32<C31),((C32-C31)/C31),0)
Customer COct-22100=IF(A33=A32,((C33-C32)/C32),0)=IF(AND(A33=A32, C33<C32),((C33-C32)/C32),0)
Customer CNov-22100=IF(A34=A33,((C34-C33)/C33),0)=IF(AND(A34=A33, C34<C33),((C34-C33)/C33),0)
1 ACCEPTED SOLUTION
negi007
Community Champion
Community Champion

@youssefm9 You can create a below measure 

 

Mom% =
var _pm = CALCULATE(SUM('Table'[Revenue]),DATEADD('Table'[Month].[Date],-1,MONTH))
var _cm = CALCULATE(SUM('Table'[Revenue]),DATEADD('Table'[Month].[Date],0,MONTH))
var _mom = IFERROR((_cm-_pm)/_pm,0)
return
_mom
 
negi007_0-1672137021563.png

also attached is the pbix file.




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



Proud to be a Super User!


Follow me on linkedin

View solution in original post

4 REPLIES 4
negi007
Community Champion
Community Champion

@youssefm9 You can create a below measure 

 

Mom% =
var _pm = CALCULATE(SUM('Table'[Revenue]),DATEADD('Table'[Month].[Date],-1,MONTH))
var _cm = CALCULATE(SUM('Table'[Revenue]),DATEADD('Table'[Month].[Date],0,MONTH))
var _mom = IFERROR((_cm-_pm)/_pm,0)
return
_mom
 
negi007_0-1672137021563.png

also attached is the pbix file.




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



Proud to be a Super User!


Follow me on linkedin

Thank you @negi007  😁 Appreciated!

amitchandak
Super User
Super User

@youssefm9 , Refer if these can help

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

 

Measure like these with help from date tables

 

example

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

Hi @amitchandak 

Unfortunately what you posted doesnt help.

I need to calculate the MOM %growth and be reflected if I select customers and/or months filters.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.