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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

count the duration of a cycle

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))
RETURN
IF(AND(CALCULATE([booléen niveau digesteur]=1000,FILTER(ALLSELECTED(dim_date),dim_date[DT (1min)] = _maxDate)),[Niveau Digesteur(m)]>=4),1000,0)
 
I get this result. (In blue the periods that my Dax measurement records). I do not get the cycles I would like.
image.png
The cycle should restart only when the "Digester level (m)" measurement reaches the value 6. As in the example below. The cycles are shown in yellow. In red are the rest periods.
image.png
 
To have a clearer view of my PBIX, here is my data table :
image.png
And below is my date table :
image.png
 
I hope my explanations are clear for you,
 

Thank you in advance,

Have a nice day

Joël

1 REPLY 1
lbendlin
Super User
Super User

As far as I know Power BI does not support hysteresis computations. Keep in mind that Power BI has no memory. You may need to do that identification of phases in the upstream system.  

 

It may seem as something easy to do with eyeballs, but this is extremely hard for a stateless engine.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.