The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello, I have a table in Power BI which shows two values (Plan and Forecast) of each month in two different columns and two different lines. This means each line is duplicated, in one case I have the Plan value and Forecast 0, in the second case I have Plan 0 and the Forecast value. I'd like to merge the two lines in one, containing both Plan and Forecast values. Below you can find an example
Could someone help me? Thanks!
Line Item ID | Month Number | Date | Plan | Forecast |
DA5 | 09 | 01/09/2023 | 0 | 1200 |
DA5 | 10 | 01/10/2023 | 0 | 1200 |
DA5 | 11 | 01/11/2023 | 0 | 1200 |
DA5 | 12 | 01/12/2023 | 0 | 1200 |
DA5 | 08 | 01/08/2023 | 0 | 1200 |
DA5 | 05 | 01/05/2023 | 0 | 1200 |
DA5 | 03 | 01/03/2023 | 0 | 1200 |
DA5 | 06 | 01/06/2023 | 0 | 1200 |
DA5 | 07 | 01/07/2023 | 0 | 1200 |
DA5 | 01 | 01/01/2023 | 0 | 1200 |
DA5 | 02 | 01/02/2023 | 0 | 1200 |
DA5 | 04 | 01/04/2023 | 0 | 1200 |
DA5 | 05 | 01/05/2023 | 1000 | 0 |
DA5 | 03 | 01/03/2023 | 1000 | 0 |
DA5 | 06 | 01/06/2023 | 1000 | 0 |
DA5 | 07 | 01/07/2023 | 1000 | 0 |
DA5 | 01 | 01/01/2023 | 1000 | 0 |
DA5 | 02 | 01/02/2023 | 1000 | 0 |
DA5 | 04 | 01/04/2023 | 1000 | 0 |
DA5 | 09 | 01/09/2023 | 1000 | 0 |
DA5 | 10 | 01/10/2023 | 1000 | 0 |
DA5 | 11 | 01/11/2023 | 1000 | 0 |
DA5 | 12 | 01/12/2023 | 1000 | 0 |
DA5 | 08 | 01/08/2023 | 1000 | 0 |
Hi @bellotma - In Power query editor, you can perform group by function based on item id , month and date as below snapshot.
final output should be look as below:
using the Group By feature and taking the maximum value of Plan and Forecast
Hope it helps, if it is still not resolved.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |