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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mlapu
Frequent Visitor

Blank answer from a measure but not from a number?

Hi! This is my first post, but I can't seem to find my answer anywhere even though it seems like a simple problem. I'm pretty new to PBi so there are things I just don't understand yet. Ok here is my problem:

 

My goal: Find the standard deviation of the dataset from the beginning of my step change to the present time (my data is being reported every 15 minutes).

 

My problem: I have created a measure that finds the beginning of the step change, using an index column as a reference. In the example it is indexed at 13,902. This is great, but when I use that measure to find the standard deviation, I only get (Blank) as an answer. If I manually enter in 13902 to the measure finding my standard deviation, it computes the correct answer (I checked on excel). 

 

My question: If the two number are the same (and seemingly of the same datatype, General), why does one work and the other returns a (Blank)?

 

Here is the code I am using to find each measure, and my outputs:

This code finds the last time the step occured:

 

IndA DP Step Date = 
var step = CALCULATE(LASTNONBLANK(MACT_15MIN_AVG[StepDate],MACT_15MIN_AVG[StepDate]))
return
CALCULATE(SUM(MACT_15MIN_AVG[Index]),MACT_15MIN_AVG[StepDate]=step)

 

 

This code is actually calculating the standard deviation:

 

IndA DP StdDEV = CALCULATE(
    STDEV.S(MACT_15MIN_AVG[A108DC01DIFF_PRES15MN_AVG_VAL0]),
    FILTER(MACT_15MIN_AVG,MACT_15MIN_AVG[Index]>[IndA DP Step Date]))

 

 

Here is a picture of my outputs, the first using my IndA DP Step Date measure, the second manually entering the same number as the measure into the filter. 

mlapu_3-1625149318981.png
mlapu_2-1625149264788.png

 

 


 

1 REPLY 1
daxer-almighty
Solution Sage
Solution Sage

You should learn about context transition before you start writing any formulas. There are lots of free DAX courses on YT. Please try to first learn the basics of DAX because without the theory you'll be struggling and get frustrated in no time.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors