The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a 12 data points for the current year. Per month there is each data point. These data points will be same for next 5 years but we have no entry in data. How can i
Present the same points for next 5 year in line chart in power bi. Data is as follows
Jan 2024 - ₹40
Feb 2024 - ₹250
March2024 - ₹25
April 2024 - ₹650
May 2024 - ₹700
June 2024 - ₹120
July 2024 - ₹200
Aug 2024 - ₹60
Sep 2024 - ₹725
Oct 2024 - ₹825
Nov 2024 - ₹280
Dec 2024 - ₹340
I dont want to duplicate the data but want acheive it dynamically with dax.
Solved! Go to Solution.
Hi @Snapdrag ,
Hope everything is going well.
Please follow these steps:
1. This is raw data.
2. To create a date table, the DAX syntax is as follows:
Calendar = CALENDAR (DATE (2024, 1, 1), DATE (2029, 12, 31))
3. Create a calculated column, and then create a new table based on this calculated column. This new table contains the dates of each month of this year and the next 5 years.
The DAX syntax for calculated columns is as follows:
Column = FORMAT('Calendar'[Date],"yyyy-mmmm")
The new table DAX syntax is as follows:
Table = VALUES('Calendar'[Column])
4. Perform data modeling on three tables.
5. In the report page, select the line chart visual object, drag "Year" and "Month" in the Date hierarchy in the "Table" table to the X axis, and drag "Projected Sales" to the Y axis for display.
The page effect is as shown below.
pbix file is attached.
If you need any other help please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @Snapdrag ,
Hope everything is going well.
Please follow these steps:
1. This is raw data.
2. To create a date table, the DAX syntax is as follows:
Calendar = CALENDAR (DATE (2024, 1, 1), DATE (2029, 12, 31))
3. Create a calculated column, and then create a new table based on this calculated column. This new table contains the dates of each month of this year and the next 5 years.
The DAX syntax for calculated columns is as follows:
Column = FORMAT('Calendar'[Date],"yyyy-mmmm")
The new table DAX syntax is as follows:
Table = VALUES('Calendar'[Column])
4. Perform data modeling on three tables.
5. In the report page, select the line chart visual object, drag "Year" and "Month" in the Date hierarchy in the "Table" table to the X axis, and drag "Projected Sales" to the Y axis for display.
The page effect is as shown below.
pbix file is attached.
If you need any other help please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
9 | |
7 |