Forum Discussion
Ranks with filter function date
- 5 years ago
The problem was that your Val_Turb_Freq_1h measure was not returning values for the day level rows. Here is a new measure that seems to work. It's a little off as your hardcoded values use a value of 81 as the threshold but the overall result for Val_Turb_Freq_1h is 80. The result from this measure matches those when 80 is used.
NewMeasure =
VAR ValTurbFreq1h =
CALCULATE (
[Val_Turb_Freq_1h],
ALLSELECTED ()
)
VAR vStop =
COUNTROWS (
FILTER (
VALUES ( fact_points_mesures_faucon[dt (10 min)] ),
[Turbidité] >= ValTurbFreq1h
)
) / 6
RETURN
vStopAlso, the logic to get your threshold values seems to be the 144th value of Turbidity (regardless if the scope is day, month, year or all time). Is that your intended logic?
Pat
In your FILTER, you are using ALL on the whole fact table which is removing filters from your date table too. Try just putting the columns you are filtering on in the ALL instead ( maybe use ALLSELECTED too).
FILTER (
ALL ( fact_points_measures_faucon[id_measure_faucon], fact_points_measures_faucon[dt (1j)], fact_points_measure_faucon[dt (1d))] ),
fact_points_measures_faucon [id_measure_faucon] = 370
&& fact_points_measures_faucon [dt (1j)] >= min_
&& fact_points_measurements_faucon [dt (1d)] <= max_
),
Pat
Hello mahoneypat
Thanks for your help but it doesn't work either, my visual loads without finding any result...
Another idea can be ? I shared my pbix to make it easier to understand.
Thanks in advance,
Joël