Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I am asking for your help in creating a measure. My report analyzes the production of different power generation sites. I have in my report several tables analyzing different periods thanks to the filter section (for example here, the filter asks to analyze the previous month, i.e. the month of January).
The different column values used in my tables refer to comparisons with results from previous years. I would like to add a column that tells me for each power plant, the number of days of history I have (the first value entered and this for each power plant because almost no power plant has the same data history).
I join my PBIX for a better understanding,
https://1drv.ms/u/s!Ao1OrcTeY008gYVOjhpqo1EzMlXjdQ?e=mB6y9S
Thank you in advance,
Have a nice day
Joël
Solved! Go to Solution.
Hello to all,
I found a solution to my own problem:
I created a measurement that corresponds to the ID of each of my power plants (a different ID for each power plant):
id_site = CALCULATE(SUM(dim_site [id]))
Then I created this measure with the "FILTER" function to find the date of the first data of each plant:
First_data = MINX(FILTER(ALL(fact_points_mesures_faucon),RELATED(dim_site[id])=id_site),fact_points_mesures_faucon[dt].[Date])
Thank you to @mahoneypat and @lbendlin for trying to help me anyway,
Good day to all,
Joël
Is this what you mean? This gives the # of days between your First Date measure and TODAY()
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hello @mahoneypat,
First of all (again) thank you for your help.
Indeed it works on the page of my report named "Relative period evolution" but I would also like to be able to do the same thing on the other pages ("Daily evolution", "Evolution month N", "Evolution month N-1") but it doesn't work:
Thank you in advance for your help,
Joël
You mean like this?
Hello @lbendlin ,
First of all thank you for reacting to my post.
Here is an example with 4 power plants:
we can see in the column "Deouis le" the date of the first recorded data. You have to start from this date to the current date to get the number of days in the history.
I have just realized that I have published a bad version of my pbix, here is the updated version with the complete data of 4 stations
https://1drv.ms/u/s!Ao1OrcTeY008gYVOjhpqo1EzMlXjdQ?e=nrGlgb
Thank you in advance,
Joël
Hello to all,
I found a solution to my own problem:
I created a measurement that corresponds to the ID of each of my power plants (a different ID for each power plant):
id_site = CALCULATE(SUM(dim_site [id]))
Then I created this measure with the "FILTER" function to find the date of the first data of each plant:
First_data = MINX(FILTER(ALL(fact_points_mesures_faucon),RELATED(dim_site[id])=id_site),fact_points_mesures_faucon[dt].[Date])
Thank you to @mahoneypat and @lbendlin for trying to help me anyway,
Good day to all,
Joël
User | Count |
---|---|
53 | |
28 | |
19 | |
18 | |
14 |
User | Count |
---|---|
92 | |
86 | |
39 | |
23 | |
22 |