Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Sample xslx-file in this DropBox link:https://www.dropbox.com/s/ktjbjszsnromv76/Usages%20sample%20data.xlsx?dl=0
Dear all :),
I am currently working on an energy usage dashboard. I have a dataset wich gives me usages for a certain day for different units. The problem is that sometimes there are a few days which did not report the usage. In such cases, the first upfollowing usage value will be much higher. This since it includes the usage of that specific day, but also the usages of the previous days which were not reported. This makes my usage graph look like (current) while I would like it to be like (desired). (Only based on unit A1)
At (desired) the usage of upfollowing missing days is calculated by evenly distributing the usage of the next known day. Example; the usage on 10/01/2022 is 9.6 while the usages of 08/01/2022 and 09/01/2022 are missing. In (desired) this means that the reported usage on the 8th, 9th and 10th is 3.2 (9.6/3).
I already managed to create an extra table which includes all possible dates that I need. Here I created a calculated column which calculates the total usage across all units using the following formula:
Solved! Go to Solution.
Great, thanks @lbendlin !
About the totals, I would indeed like to have a graph with all the usages combined. In which table do I place this column and what would the code then look like? I'm struggling with this part because the unit condition should disappear, which should also change how dax calculates the total usage.
Would you be ok with a calculated column?
I would ofcourse prefer a measure in this case, but if a calculated column does the job and is way easier then that would be fine as well. Thanks @lbendlin !
I already managed to create an extra table which includes all possible dates that I need.
This is a good (and required) first step. Next step is to write a measure for each of these dates that either takes the reading for that day, or calculates the appropriate fraction of the next reading for days without reading. If you only ever miss one then you can take half of the value , otherwise you'll first need to figure ot how many readings were missed etc. For days with reading but with prior days missing you need to deduct accordingly.
Calculated Table:
Measure:
As you can see the totals are missing. This is due to the design of the measure. An easy solution would be to use a calculated column instead.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
88 | |
86 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
88 | |
70 | |
66 |