Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18097

measure difference from filtered values

$
0
0

Hello Community,

 

I am trying to visualize an inclinometer chain composed of 20 sensors. 

I receive the data every hour and I have to visualize a comparison (difference of values) of every measurement with a reference measurement that can be chosen dynamically. 

Every ONE measurement is composed of 40 rows, depending on the depth and the direction A or B. 

All 40 rows are to be recognized by the same measurement date and time... This is how a measurement is defined.

 

As a first step. I have fixed a reference measurement by adding a column called reference_measurment which is equal to 1 in the rows to be considered for this reference measurement and is then 0 elsewhere. 

I have created a quick measure as follows:

Average of value difference from 1 =
VAR __BASELINE_VALUE =
    CALCULATE(
        AVERAGE('Inklinometer (2)'[value]),
        'Inklinometer (2)'[reference_measurement] IN { 1 }
    )
VAR __MEASURE_VALUE = AVERAGE('Inklinometer (2)'[value])
RETURN
    IF(NOT ISBLANK(__MEASURE_VALUE), __MEASURE_VALUE - __BASELINE_VALUE)
 
On the graph I see that the measure applies only for one measurement which is actually the reference one => I get 0 everywhere. But it does not work for the other values of the column (other values of other measurements).
 
I think it might have to do that power BI cannot sort the values in the right order to be able to calculate the requested measure...  I don't know how I can sort, or order or give a condition saying where the baselinevalue[depth] = measurevalue[depth]... 
 
can someone help me?
 
Then I need to solve the problem of being able to visualize the measure values on my x-axis and not on the y-axis.
and then I need to figure out how I can choose the reference measurement dynamically... 
 
I will really appreciate some help!
Thank you in advance.
Best regards,
Yushi
 
 
 
 
 

Viewing all articles
Browse latest Browse all 18097

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>