It's my first time writing here 🙂
I would really appreciate your help to solve this issue.
I have a table which contains these values:
DAYS | Count of number of runs | Cumulative sum of systems installed in the reference day | Number of runs/Installed systems
DAY1 | 1 | 1 | 1
DAY2 | 3 | 1 | 3
DAY3 | 1 | 1 | 1
DAY4 | 0 | 1 | 0
DAY5 | 1 | 2 | 0.5
DAY6 | 5 | 2 | 2.5
DAY7 | 0 | 2 | 0
DAY8 | 0 | 3 | 0
DAY9 | 2 | 3 | 0.67
DAY10 | 4 | 3 | 1.33
These values are calculated as follows:
DAYS: comes from a list starting from july-2016 to today
Number of runs: I have a table in which I have all the runs and it comes from COUNT([Experiment Name])
Cumulative sum of installed systems: it counts the number of systems installed and cumulate theme day by day
Number of runs/installed systems: DIVIDE([Number of runs];[Installed systems])
Let's imagine that DAY1 to DAY4 are in QUARTER1 of the year, whil DAY5 to DAY10 are in QUARTER2 of the year.
What I would like to obtain is the sum of the ratio: as an example for Q1: 1+3+1+0 and for Q2: 0.5+2.5+0.67+1.33
Since all columns comes from calculations, I have tried to perform a cumulative sum as follows:
I had to put the CALCULATE, since otherwise it will make the sum of runs and divided it by the number of systems (which is actually different from summing all the ratios).
The formula works, but it continues to cumulate the sum: I would like that the cumulative sum is only for the quarters and not for the entire period.
Can someone please help me? I'm getting crazy 😞
@martinap do you have calendar/date dimension in your model, it is best practice to have one for time intelligence calculation like yours. you can always use TOTALQTD DAX function to get total by quarter.
These are all the formulas that I created:
List of days from Jul-2016 to today -> DATE format
Quarter (2016-Q3, 2017-Q4, etc) -> TEXT format
Number of installed systems:
=[Installed Systems]-[Uninstalled Systems]
For cumulative sum of installed base through days
=SUMX(FILTER(ALLSELECTED('list-days'[Days]);'list-days'[Days]<=MAX ('list-days'[Days]));[Installed Base])
Number of run per day
Run/Installed Base per day:
=CALCULATE(DIVIDE([Number of run per day];[Installed Base [Day]]]))
If I plot this using DAY as X axes and Y it is ok
If I change the X axes with year-quarter, what I obtain is TOTAL NUMBER OF RUN/TOTAL NUMBER OF SYSTEMS, but I would like to have the SUM of each NUMBER OF RUN/NUMBER OF SYSTEMS per day
If I try to add the TOTALQTD to this formula, and plot it QUARTER vs. FORMULA, I obtain the same
Cumulative sum over a quarter:
=SUMX(FILTER(ALLSELECTED('list-days'[Day]);'list-days'[Day]<=MAX('list-days'[Day]));CALCULATE([Run/Installed Base [Day]]]))
The first row for the first quarter is ok, but the second quarter includes the total of the first quarter + new values and so on
For the first quarter: 29.67 is 89/3 and it is wrong
33.33 is the sum of run/installed base for each day
66.016 is the sum of run/installed base for each day, including the total from the previous quarter
Maybe I can do the trick by subtracting the value from the previous quarter in the formula?
Unluckily it is quite difficult for me to share the Excel, since it contains a lot of data, that I cannot share 😞
Find your favorite faces from the community presenting at the Power Platform Community Conference!
See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.
Join this community-driven Power Platform digital event for unbiased support and problem-solving.