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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Gopal_PV
Helper III
Helper III

How calculate subscription based units on Month wise MoM Like Beginning of Month, Added in the Month

Hi Folks,

I am connecting from snowflake Datamart to Power BI Using View.  I have retriving Created_dt, Year,Month,ID,Name, sum(Units) from the view.

It is subscription based business. I want to display Beginning of Month units, Added in the Month Units, End of the month units. Growth

Can you please help me How to create dax calculation to achive the oupt report. It is for all the months across the years.

Thank you very much in advance.

Data:

Created_dtYear_CreatedMonth_CreatedIDNameUNITS
6/14/2022202261175Planet Entertainment52973
7/26/2022202271185sony Entertainement5758
9/19/202220229204Amazon Entertainement27594
10/26/20222022101224Netflix 25692
10/30/20222022101228Z50
1/4/2023202311282Aha22475
3/13/2023202331336JioHotstar4280
4/3/2023202341373MX Player0
6/9/2022202261172Voot26240
8/1/2022202281189Youtube204104
10/25/20222022101221Eros Now36778
10/30/20222022101227Alt Balaji448957
1/19/2023202311111Discovery ++232743

 

Required OutPut Report:

Gopal_PV_0-1752688419148.png

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Gopal_PV Try:

Beginning Month Units Measure =
  VAR __Date = MIN( 'Data'[Created_dt] )
  VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
  __Result


Ending Month Units Measure =
  VAR __Date = MAX( 'Data'[Created_dt] )
  VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
  __Result


Growth Measure = [Ending Month Units Measure] - [Beginning Month Units Measure]


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Gopal_PV Try:

Beginning Month Units Measure =
  VAR __Date = MIN( 'Data'[Created_dt] )
  VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
  __Result


Ending Month Units Measure =
  VAR __Date = MAX( 'Data'[Created_dt] )
  VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
  __Result


Growth Measure = [Ending Month Units Measure] - [Beginning Month Units Measure]


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.