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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ROG
Responsive Resident
Responsive Resident

YTD Var measure

Hi guys,

 

I've inherited a report, which has the DAX measure for YTD Variance as per below, which I can understand, but can you please help me to understand the "Vs YTD" and "Vs YTD_2"measure?

 

Can you please tell what's the DAX measure for YTD Variance?

 

YTD KPI Value Var = [KPI Value YTD] - [KPI Value LYTD]

 

[KPI Value YTD] = CALCULATE([KPI Value TY%],DATESYTD('Dim_Date'[Date]))
[KPI Value LYTD] = CALCULATE([KPI Value YTD],SAMEPERIODLASTYEAR('Dim_Date'[Date]))
 
Vs YTD= DIVIDE([YTD KPI Value Var],[KPI Value LYTD])

Vs YTD_2= [KPI Value TY] - CALCULATE(TOTALYTD( [KPI Value TY%]),Dim_Date[DATE]))

Many thanks inadvance! 😊
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @ROG ,

I created some data:

vyangliumsft_0-1664329776425.png

You can try the following formula:

https://learn.microsoft.com/en-us/dax/varx-p-function-dax

https://learn.microsoft.com/en-us/dax/varx-s-function-dax

Here are the steps you can follow:

1. Create measure.

Measure =
var _today=TODAY()
return
VARX.P(FILTER(ALL('Table'),'Table'[Date]>=DATE(YEAR(_today),1,1)&&'Table'[Date]<=_today),[Amount])

2. Result:

vyangliumsft_1-1664329776429.png

 

Best Regards,

Liu Yang

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @ROG ,

I created some data:

vyangliumsft_0-1664329776425.png

You can try the following formula:

https://learn.microsoft.com/en-us/dax/varx-p-function-dax

https://learn.microsoft.com/en-us/dax/varx-s-function-dax

Here are the steps you can follow:

1. Create measure.

Measure =
var _today=TODAY()
return
VARX.P(FILTER(ALL('Table'),'Table'[Date]>=DATE(YEAR(_today),1,1)&&'Table'[Date]<=_today),[Amount])

2. Result:

vyangliumsft_1-1664329776429.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.