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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.