This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I now have a line chart that shows what percentage of the orders have been achieved in a period based on requirements (for example, in the month of May there are 50 orders, of which 47% has been achieved). This line chart then shows the 47%.
However, I want to create a line chart that displays the percentage in the same way, but the percentage must also take into account orders from previous months. So up to and including April, for example, there have been 1000 orders and 67% of these have been fulfilled. In May, the above-mentioned 50 orders will be added, so that, for example, 65% of the 1050 have been achieved. The 65% must then be displayed in the line chart because it counts the previous months.
The line chart must be so flexible that I can make a choice between month level, year level, week level and day level.
Solved! Go to Solution.
Hi @Anonymous ,
I suggest you to create a related date table to create the slicer and then create measures to calculate the result you want.
My Sample:
Date =
ADDCOLUMNS (
CALENDAR ( MIN ( 'Table'[Date] ), MAX ( 'Table'[Date] ) ),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"MonthName", FORMAT ( [Date], "MMMM" ),
"Weeknum", WEEKNUM ( [Date] ),
"Day", DAY ( [Date] )
)
Relationship:
Measure:
Basic Percentage =
DIVIDE ( SUM ( 'Table'[Completed Qtr] ), SUM ( 'Table'[Qtr] ) )Rolling Percentage =
CALCULATE (
[Basic Percentage],
FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) )
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I suggest you to create a related date table to create the slicer and then create measures to calculate the result you want.
My Sample:
Date =
ADDCOLUMNS (
CALENDAR ( MIN ( 'Table'[Date] ), MAX ( 'Table'[Date] ) ),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"MonthName", FORMAT ( [Date], "MMMM" ),
"Weeknum", WEEKNUM ( [Date] ),
"Day", DAY ( [Date] )
)
Relationship:
Measure:
Basic Percentage =
DIVIDE ( SUM ( 'Table'[Completed Qtr] ), SUM ( 'Table'[Qtr] ) )Rolling Percentage =
CALCULATE (
[Basic Percentage],
FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) )
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 22 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 25 | |
| 22 | |
| 20 |