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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Mniknejad
Frequent Visitor

% growth in monthly report

Hi Folks 

 

I have table like below 

Considconsdatestatecity 
qqjh2021-08-01ONtoronto
skjdf2021-07-01QCMontreal
dksdlksm2021-07-10QCMontreal
wodmslm2021-08-01QCMontreal
djnhm2021-07-10ONtoronto
lklj2021-08-10ONtoronto
sclzx2021-07-10ONtoronto
efrd2021-06-10ONtoronto
aaa2021-06-01QCMontreal
gfg2021-06-22QCMontreal

 

I need to show a table that show month to month count (consID) and %Growth of  each month  like this 

 

        
Count of ConsidColumn Labels     
Row LabelsJunJulAugGrand Total   
ON235137324696 JUL - Jun /JUN = =  -98 /235 aug -Jul /JUL  ==  187 /137 
toronto235137324696   
QC122132100354   
Montreal122132100354   
Grand Total3572694241050   
        
        
        

 

 

what is your sugesstion ?! 

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Mniknejad 

 

Try this measure:

%Growth = 
VAR _LastM =
    CALCULATE (
        COUNTA ( 'Table'[Consid] ),
        ALLEXCEPT ( 'Table', 'Table'[consdate], 'Table'[state], 'Table'[city ] ),
        PREVIOUSMONTH ( 'Table'[consdate] )
    )
VAR _ThisM =
    COUNTA ( 'Table'[Consid] )
RETURN
    IF ( ISBLANK ( _LastM ), BLANK (), ( _ThisM - _LastM ) / _LastM )

 

Output:

VahidDM_0-1638330914879.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @Mniknejad 

Based on the sample you attached, you can try this,

create the measure

growth = 
    var _premonth=MAX('calendar'[Month])-1
    var _thiscount=CALCULATE(COUNT('Table'[Consid]),'Table')
    var _precount=CALCULATE(COUNT('Table'[Consid]),FILTER(ALLEXCEPT('Table','Table'[state],'Table'[city]),MONTH('Table'[consdate])=_premonth))
return DIVIDE(_thiscount-_precount,_precount,BLANK())

vxiaotang_1-1640140645328.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached sample pbix file.

I suggest having a Dim-Calendar table.

 

Picture1.png

 

ID Count: =
COUNTROWS ( Data )
 
ID count Previous Month: =
CALCULATE ( [ID Count:], DATEADD ( 'Calendar'[Date], -1, MONTH ) )
 
ID Count Growth: =
IF (
ISBLANK ( [ID Count:] ),
BLANK (),
DIVIDE ( [ID Count:] - [ID count Previous Month:], [ID count Previous Month:] )
)


Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question



VahidDM
Super User
Super User

Hi @Mniknejad 

 

Try this measure:

%Growth = 
VAR _LastM =
    CALCULATE (
        COUNTA ( 'Table'[Consid] ),
        ALLEXCEPT ( 'Table', 'Table'[consdate], 'Table'[state], 'Table'[city ] ),
        PREVIOUSMONTH ( 'Table'[consdate] )
    )
VAR _ThisM =
    COUNTA ( 'Table'[Consid] )
RETURN
    IF ( ISBLANK ( _LastM ), BLANK (), ( _ThisM - _LastM ) / _LastM )

 

Output:

VahidDM_0-1638330914879.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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