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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Super User
Super User

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
Super User
Super User

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.