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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Megha2498
Frequent Visitor

Power BI DAX

Hi

I need a DAX to calculate the variance % for etime data.

 

I am trying to using some date related DAX but it is not helping me.

The variance I am trying to get is

(# of open tickets in previous month - # of open tickets in reporting month) / # of open tickets in previous month

 

Start of the reporting month is 28 -Feb- 2023

sample data is below:

 

MonthOpen Requests (Reporting Month)Open Request (Previous Month)Variance%
Feb-2310206  
Mar-2310062102061.41%
Apr-231133610062-12.66%
May-231721511336-51.86%
Jun-231739017215-1.02%
Jul-232090317390-20.20%
Aug-2320692209031.01%
Sep-232314020692-11.83%
Oct-232476423140-7.02%
Nov-2323598247644.71%
Dec-2322180235986.01%
Jan-242256622180-1.74%
Feb-242431822566-7.76%
Mar-24218832431810.01%
Apr-242290621883-4.67%
May-24185422290619.05%
Jun-242458918542-32.61%
1 ACCEPTED SOLUTION
barritown
Solution Sage
Solution Sage

Hi @Megha2498,

You can create a calculated column below and adjust the output format to percentage:

barritown_0-1718308814927.png

In plain text:

calc_column_solution = 
VAR curMonthValue = [Open Requests (Reporting Month)]
VAR curMonth = [Month]
VAR prevMonth = MAXX ( FILTER ( tbl_with_data, [Month] < curMonth ), [Month] )
VAR prevMonthValue = MINX ( FILTER ( tbl_with_data, [Month] = prevMonth ), [Open Requests (Reporting Month)] )
RETURN DIVIDE ( prevMonthValue - curMonthValue, prevMonthValue )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

View solution in original post

1 REPLY 1
barritown
Solution Sage
Solution Sage

Hi @Megha2498,

You can create a calculated column below and adjust the output format to percentage:

barritown_0-1718308814927.png

In plain text:

calc_column_solution = 
VAR curMonthValue = [Open Requests (Reporting Month)]
VAR curMonth = [Month]
VAR prevMonth = MAXX ( FILTER ( tbl_with_data, [Month] < curMonth ), [Month] )
VAR prevMonthValue = MINX ( FILTER ( tbl_with_data, [Month] = prevMonth ), [Open Requests (Reporting Month)] )
RETURN DIVIDE ( prevMonthValue - curMonthValue, prevMonthValue )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.