Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Count if values

Hello to all,

I ask for your help concerning a measurement of type "IF".

I would like to display "1000" when the value of the measurement "Digester level (m)" reaches the value of 6 then continue to display "1000" as long as the value of the measurement has not reached a value lower than 4. When the value is below 4, stop counting until the cycle repeats itself. Today here is my measurement:

Période torchée =
VAR _selDate = SELECTEDVALUE(dim_date[DT (1min)])
VAR _maxDate = CALCULATE(LASTNONBLANK(dim_date[DT (1min)], [booléen niveau digesteur]), FILTER(ALLSELECTED(dim_date[DT (1min)]), dim_date[DT (1min)] < _selDate))
VAR _maxDate_dig = CALCULATE(LASTNONBLANK(dim_date[DT (1min)], [Niveau Digesteur(m)]), FILTER(ALLSELECTED(fact_point_torch_juin), [Niveau Digesteur(m)] >= 4))
IF(AND(CALCULATE([booléen niveau digesteur]=1000,FILTER(ALLSELECTED(dim_date),dim_date[DT (1min)] = _maxDate)),[Niveau Digesteur(m)]>=4),1000,0)
I obtain this result, the problem is that the "IF" does not wait that the measurement reaches again the value 6 to post 1000.
The cycle does not work, it would be necessary that the zone framed in red is equal to zero here.

Is my problem clear ?

Thank you in advance,

Have a nice day



Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors