Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I am trying to create Line and Clustered Column Chart, with custom lines
Shortcut of dataset is below:
| Is_reviewed | Doc_number | Forecast Dates | Period Type |
| True | 61-BDIN-52001 | June 2023 | Actual |
| False | 61-BFIN-21012 | June 2023 | Forecast |
| True | 61-HS-51762-3 | June 2023 | Actual |
| True | 61-NAS-52083 | June 2023 | Actual |
| False | 61-NFI-52007 | June 2023 | Forecast |
| False | 61-NGC-52010-1 | June 2023 | Forecast |
| False | 61-NGC-52071 | June 2023 | Forecast |
| False | 61-NGT-52060 | June 2023 | Forecast |
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:
Please help to create measures for this 2 additional lines.
Many thanks!
Solved! Go to Solution.
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.
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 @Nurzh ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(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-_bForecast 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.
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.
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.
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 61 | |
| 44 | |
| 41 | |
| 36 | |
| 21 |
| User | Count |
|---|---|
| 176 | |
| 120 | |
| 106 | |
| 77 | |
| 52 |