Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello:
I'm trying to display a trend line using a line chart for various Users. The line chart defaults to showing the number of records for over 250 Users, but there is a User slicer so that people can choose to view the trend lines for specific Users. The data snapshot is taken every 2 weeks. Some Users might have a few records during certain time and no record at other times. For example, the User below only had 1 record in mid October 2023, 3 records in beginning of Nov, 2 records at beginning of December, and 1 record in mid December:
However, since the data snapshots are actually from Oct. 1, 2023 up to today's date, we want the line chart to show from Oct. 1, 2023 to February 2024 even though this specific User had no record in the beginning/end. In other words, the x-axis should show Oct. 2023 through Feb. 2024. Ideally, the y axis should show 0 as the minimum. For example:
This way, the date x-axis line graph will stay consistent from Oct. 2023 to today's date for all users. Some users will have records in the whole date range. We still want to show the whole date range even for those who do not have any record at the begnning / end of the date range.
Is this possible?
Thank you in advance!
Solved! Go to Solution.
Hi @yosedesh ,
You can accomplish this desired result in the settings of the line chart:
For example:
This is what the line chart looks like:
Click the line chart, and make the settings as shown in the figure below:
Set start date to 2023/10/1:
Use this DAX to create a new measure and set the end date to today:
Today = TODAY()
The final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @yosedesh ,
Sorry when I review my reply, I find that I forgot to set the y-axis to start at 0. I changed the previous pbix file:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @yosedesh ,
You can accomplish this desired result in the settings of the line chart:
For example:
This is what the line chart looks like:
Click the line chart, and make the settings as shown in the figure below:
Set start date to 2023/10/1:
Use this DAX to create a new measure and set the end date to today:
Today = TODAY()
The final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @yosedesh ,
Sorry when I review my reply, I find that I forgot to set the y-axis to start at 0. I changed the previous pbix file:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @yosedesh,
Just use a Date Dimension Date as your X Axis so that you get all of the dates. You may need to right click on the date field inside of the visual pane and select show items with no data. You may also need to add a date slicer so that you don't see all dates inside of your date dimension.
Here is a link to a public date dim from the company I work for:
Why Create a Date Table in Power BI? : :: Welcome To EPM Strategy ::
User | Count |
---|---|
114 | |
73 | |
57 | |
47 | |
38 |
User | Count |
---|---|
173 | |
121 | |
58 | |
58 | |
56 |