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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Kostas
Helper IV
Helper IV

Line Percentage MoM completion Comparison

Hello Everyone, 

Once again need your help. 
I am having the below table

ReferenceStatusDate CompletionPlan Year
Ref1Complete05/06/20202020
Ref2Incomplete 2020
Ref3Complete08/06/20212021
Ref4Complete09/11/20212021
Ref5Complete08/04/20222022
Ref6Complete02/08/20222022

 

What I need is to produce that shows the percentage completion on month by month basis. Each line in the line graph to present the percentage completion of each year as to the total number of references for each plan year. Something Like:

Capture.JPG

Where each line will be in legend:

Blue = 2022 (In progress)

Red = 2021

Purple  = 2020

and in the X axis I will have the months (i.e. January February March etc.)

 

What I have done already was to create a calendar table and create the following measure one for each year (2020,2021,2022):

 

 

Completed Proportion 2020 = 
Var Measurement = 
IF(
    MAX('Calendar'[Date])  <= TODAY() || 
    MAX('Calendar'[Date].[Year]) = YEAR(TODAY()) && MAX('Calendar'[Date].[MonthNo]) = MONTH(TODAY()) ,
	 CALCULATE (
        DISTINCTCOUNT ('Table'[Reference] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date Completion] <= MAX ( 'Calendar'[Date]) 
        ) ,
         NOT(ISBLANK('Table'[Date Completion] )), 'Table'[Status] = "Complete",
         'Table'[Plan Year] = "2020"
    )
,
BLANK()
)

Var TotalAudits = 
CALCULATE(DISTINCTCOUNT('Table'[Reference]), 'Table'[Status] <> "Incomplete",'Table'[Plan Year] = "2020")

RETURN
Measurement/TotalAudits

 

 

But when I placing all three measures in my line graph I am not getting it in MoM basis but as total delivery throughout the three years. It works only when I drill down to split the hierarchy while when I am choosing to just drill down to next level it does not return any results.

Capture1.JPG


Can you please assist?

2 REPLIES 2
amitchandak
Super User
Super User

@Kostas , You can have measure for current and last month and then use

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
this month = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))

 

diff %= divide([this month]-[last month], [last month])

 

and use this measure with month on axis and year as legend and you have use those from date table 

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello @amitchandak and thanks for your reply. 

How the date within the calculation is connected with the completion date in the table above?
Sorry I am not sure how that works. 
Also, in the last calculation you are using the Previous and This month calculations, how should I utilise the first two measures?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors