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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Nurzh
Frequent Visitor

Line and Clustered Column Chart, custom line

Hi all, 

I am trying to create Line and Clustered Column Chart, with custom lines

Shortcut of dataset is below:  

Is_reviewedDoc_numberForecast DatesPeriod Type
True61-BDIN-52001June 2023Actual
False61-BFIN-21012June 2023Forecast
True61-HS-51762-3June 2023Actual
True61-NAS-52083June 2023Actual
False61-NFI-52007June 2023Forecast
False61-NGC-52010-1June 2023Forecast
False61-NGC-52071June 2023Forecast
False61-NGT-52060June 2023Forecast

 

The goal is to create custom line that shows: 

1. Actual rundown: Sum of all Doc_numbers and minus only count of Doc_numbers with Is_reviewed = True  (dataset will be updated to true if someone will review this doc number) and Period Type=Actual

2. Forecast rundown: Sum of all Doc_numbers and minus count of Doc_numbers with  Is_reviewed = False and Period Type=Forecast

The correct version of chart was in Excel below, and I am trying create in Power BI: 

 

Nurzh_0-1688365909917.png

 

Please help to create measures for this 2 additional lines. 

 

Many thanks! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Nurzh ,

 

Create another measure and place it on the [line y-axis].

 

Measure = IF(SELECTEDVALUE('Table'[Period Type])="Actual",[Actual rundown],[Forecast rundown])

 

Change the style of the line under the [format your visual] pane.

 

vtangjiemsft_0-1688538420182.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Nurzh ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

vtangjiemsft_0-1688523230003.png

(2) We can create measures. 

 

Actual rundown = 
var _a=COUNTROWS(VALUES('Table'[Doc_number]))
var _b=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Is_reviewed]=TRUE() && 'Table'[Period Type]="Actual"))
return _a-_b
Forecast rundown = 
var _a=COUNTROWS(VALUES('Table'[Doc_number]))
var _b=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Is_reviewed]=FALSE() && 'Table'[Period Type]="Forecast"))
return _a-_b

 

(3) Then the result is as follows.

vtangjiemsft_1-1688523260373.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Hi @Anonymous , 

Thanks for sharing, 

Could you please also advise why the line not presented as desired result that I have attached previously, it's devided into 2 lines. 

Nurzh_0-1688531394228.png

 

I need to show one single line, for actual and forecast rundown. In my source file totally I have 133 doc number, and their status gradually will be changed to actual from forecast. For example this total 133 doc numbers will run down with changing of their status is_reviewed = true. 

 

 

Anonymous
Not applicable

Hi @Nurzh ,

 

Create another measure and place it on the [line y-axis].

 

Measure = IF(SELECTEDVALUE('Table'[Period Type])="Actual",[Actual rundown],[Forecast rundown])

 

Change the style of the line under the [format your visual] pane.

 

vtangjiemsft_0-1688538420182.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.