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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Calculate downtime production

Hello everyone,

I would like to calculate the downtime of my production machine. Here is my data table :

image.png

I have several DTs as you can see. I would like my measurement to calculate the elapsed time in decimal hour format when the following conditions are met :
Column "falcon_measure_id" = 54 and Column "Value" = 0. The result obtained must be variable according to the period I choose to study. Can I use the "ALLSELECTED" function ?

 

Thank you in advance for your help,

 

Joël

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @StefanoGrimaldi 
I will try to explain my problem. First of all, I am French, which explains the writing of certain measures. I analyze the production of a hydroelectric power plant according to a turbidity threshold. Turbidity is the power of water. The higher its value is, the greater the risk of deteriorating our equipment. The definition of this threshold is important because it is the one that will determine whether or not we shut down the hydroelectric plant. My first objective was to find the turbidity value for a day of shutdown of the power station according to a period of time that I will have chosen thanks to the segment. To create this measurement I first used the "index" column of my Dataset and created the following measurement:

Index_Arrets_Turbidité = RANKX(FILTER(ALLSELECTED(fact_points_mesures_faucon[dt (10 min)],fact_points_mesures_faucon[id_mesure_faucon]), fact_points_mesures_faucon[id_mesure_faucon]=370),
[Index turbidité],,ASC,Skip)

370 being the ID of the turbidity measuring probe. Then I created the measurement allowing me to identify the turbidity value corresponding to a day of shutdown of the power plant:

Val_Turb_Arrets_1j = MAXX(FILTER(ALLSELECTED(fact_points_mesures_faucon[dt (10 min)],fact_points_mesures_faucon[id_mesure_faucon]), fact_points_mesures_faucon[id_mesure_faucon]=370 && [Index_Arrets_Turbidité] = 144), [Turbidité])

I used 144 because my time base is in DT10MIN and therefore 24*6 is equal to 24h. The result obtained corresponds to my expectations. I then created a measure to calculate the downtime in h by first creating an "IF" function:

Arrêts turbidité_1j =
IF([Turbidité]>=[Val_Turb_Arrets_1j],1,0)

Then a measurement that summarizes the downtime :

Arrêts turbidité_temps_1j (en h) =
SUMX(SUMMARIZE(VALUES(fact_points_mesures_faucon[dt (10 min)]),fact_points_mesures_faucon[dt (10 min)],"STOP",[Arrêts turbidité_1j]/6),[STOP])

Problem, here are the results I get:

image.png

However, when in the measurement "Tubidity stops_1j" I manually enter the turbidity threshold like this:

Arrêts turbidité_1j =
IF([Turbidité]>=78,1,0)

The result obtained is the following and it corresponds to my expectations:

image.png

I would therefore like this result without having to manually enter the turbidity threshold since I have it automatically with the "Val_Turb_Arrets_1j" measurement. I attach two CSV files to better understand the dataset I have. "Analyse Turbidité_Manuel" corresponds to the data I get by typing the turbidity threshold manually. "Analyse Turbidité Automatique" corresponds to the data I get with the measurement IF([Turbidité]>=[Val_Turb_Arrets_1j],1,0)".

https://1drv.ms/u/s!Ao1OrcTeY008gYU002hcwyM1NXYNsw?e=JFB2q8 

https://1drv.ms/u/s!Ao1OrcTeY008gYUzObVYKCPcAd_81w?e=5cKcbF 

Thank you in advance for your help.

Joël

 

View solution in original post

2 REPLIES 2
StefanoGrimaldi
Resident Rockstar
Resident Rockstar

hey, I would reccomend put a example output of the wanted result, as isnt very clear what exactly you aiming for here.





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Anonymous
Not applicable

Hello @StefanoGrimaldi 
I will try to explain my problem. First of all, I am French, which explains the writing of certain measures. I analyze the production of a hydroelectric power plant according to a turbidity threshold. Turbidity is the power of water. The higher its value is, the greater the risk of deteriorating our equipment. The definition of this threshold is important because it is the one that will determine whether or not we shut down the hydroelectric plant. My first objective was to find the turbidity value for a day of shutdown of the power station according to a period of time that I will have chosen thanks to the segment. To create this measurement I first used the "index" column of my Dataset and created the following measurement:

Index_Arrets_Turbidité = RANKX(FILTER(ALLSELECTED(fact_points_mesures_faucon[dt (10 min)],fact_points_mesures_faucon[id_mesure_faucon]), fact_points_mesures_faucon[id_mesure_faucon]=370),
[Index turbidité],,ASC,Skip)

370 being the ID of the turbidity measuring probe. Then I created the measurement allowing me to identify the turbidity value corresponding to a day of shutdown of the power plant:

Val_Turb_Arrets_1j = MAXX(FILTER(ALLSELECTED(fact_points_mesures_faucon[dt (10 min)],fact_points_mesures_faucon[id_mesure_faucon]), fact_points_mesures_faucon[id_mesure_faucon]=370 && [Index_Arrets_Turbidité] = 144), [Turbidité])

I used 144 because my time base is in DT10MIN and therefore 24*6 is equal to 24h. The result obtained corresponds to my expectations. I then created a measure to calculate the downtime in h by first creating an "IF" function:

Arrêts turbidité_1j =
IF([Turbidité]>=[Val_Turb_Arrets_1j],1,0)

Then a measurement that summarizes the downtime :

Arrêts turbidité_temps_1j (en h) =
SUMX(SUMMARIZE(VALUES(fact_points_mesures_faucon[dt (10 min)]),fact_points_mesures_faucon[dt (10 min)],"STOP",[Arrêts turbidité_1j]/6),[STOP])

Problem, here are the results I get:

image.png

However, when in the measurement "Tubidity stops_1j" I manually enter the turbidity threshold like this:

Arrêts turbidité_1j =
IF([Turbidité]>=78,1,0)

The result obtained is the following and it corresponds to my expectations:

image.png

I would therefore like this result without having to manually enter the turbidity threshold since I have it automatically with the "Val_Turb_Arrets_1j" measurement. I attach two CSV files to better understand the dataset I have. "Analyse Turbidité_Manuel" corresponds to the data I get by typing the turbidity threshold manually. "Analyse Turbidité Automatique" corresponds to the data I get with the measurement IF([Turbidité]>=[Val_Turb_Arrets_1j],1,0)".

https://1drv.ms/u/s!Ao1OrcTeY008gYU002hcwyM1NXYNsw?e=JFB2q8 

https://1drv.ms/u/s!Ao1OrcTeY008gYUzObVYKCPcAd_81w?e=5cKcbF 

Thank you in advance for your help.

Joël

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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