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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Walt
Frequent Visitor

VAR.P STDEV.P all prevous dates in a column

I am having issues getting all the VAR.P and STDEV.P Values for previous dates.  The Measure I am using works with a date slicer to find the previous values, but when I try to get a Column I have issues.
The end goal is to find the MAX, MIN and AVG of VAR.P and STDEV.P...
I am using these measures:
_m_VAR.P = VAR.P(Table[Values])
_m_STDEV.P = STDEV.P(Table[Values])

I can see the data I need in the slicer. Below are the examples:
Any help would be appreciated.

Thank you,


Walt_0-1662049405886.png

Walt_4-1662049720096.png

Walt_3-1662049647553.png

 

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Walt ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1662455215464.png

 

Please try:

 

_STDEV.P = CALCULATE(STDEV.P('Table'[Value]),FILTER(ALL('Table'),[Date]<=MAX('Table'[Date])))

_VAR.P = CALCULATE(VAR.P('Table'[Value]),FILTER(ALL('Table'),[Date]<=MAX('Table'[Date])))

 

Final output:

vjianbolimsft_1-1662455248214.png

Best Regards,

Jianbo Li

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

6 REPLIES 6
v-jianboli-msft
Community Support
Community Support

Hi @Walt ,

 

You mentioned The end goal is to find the MAX, MIN and AVG of VAR.P and STDEV.P before. What is the exact meaning of MAX, MIN and AVG? For value or for VAR.P and STDEV.P? 

Please provide more details about your problems or give a simple example aboult the expected result.

 

Best Regards,

Jianbo Li

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

It's sorted.  It was a request that was not needed.  Thank you.

v-jianboli-msft
Community Support
Community Support

Hi @Walt ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1662455215464.png

 

Please try:

 

_STDEV.P = CALCULATE(STDEV.P('Table'[Value]),FILTER(ALL('Table'),[Date]<=MAX('Table'[Date])))

_VAR.P = CALCULATE(VAR.P('Table'[Value]),FILTER(ALL('Table'),[Date]<=MAX('Table'[Date])))

 

Final output:

vjianbolimsft_1-1662455248214.png

Best Regards,

Jianbo Li

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

@v-jianboli-msft,
Thank you, this helped me to see the values for each date, however I am still having issues finding the AVG, MIN, and MAX of the values when filtered by catigories.  

tamerj1
Super User
Super User

Hi @Walt 

when you add the date to the filter contaxt apparently you're drilling through to the row level. The Stdv and the Var of a single value is 0. What values are you expecting to see here?

Walt
Frequent Visitor

I am trying to get the VAR and STDV for each date.  The end goal is to use those values for each date and find the Min, Max and AVG. 
something like this...
Date          :  VAR
June 30th  :  17.93
March 1st  :  18.73

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.