Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I currently have a bar chart in my report that I am trying to configure to update the data automatically based on the current month instead of having a slicer where the user has to select the current month. I am using a calculated column as shown below on the chart as a filter, and it works when it comes to updating the data. However, my month days do not change accordingly. For example this month for February shows 31 days, instead of 28.
IsCurrentMonth = IF ( YEAR ( Inventory[dateLogged] ) = YEAR ( TODAY () ) && MONTH ( Inventory[dateLogged] ) = MONTH ( TODAY () ), "Yes", "No" )
Does anybody know a way to make the day numbers change as well?
Thank you!
Solved! Go to Solution.
Hi @Ashley
I recommend maybe adjusting the approach slightly and using Relative Dates on the axis of your chart. This will hopefully help you achieve what you are after.
Here is a link as well to the Microsoft doc that goes into it a little bit more. There is the choice of Slicer or Filter. Clearly, Slicer is not what you want. So scroll down the page a little and you'll get to Filters.
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Hope this helps! 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @Ashley
I recommend maybe adjusting the approach slightly and using Relative Dates on the axis of your chart. This will hopefully help you achieve what you are after.
Here is a link as well to the Microsoft doc that goes into it a little bit more. There is the choice of Slicer or Filter. Clearly, Slicer is not what you want. So scroll down the page a little and you'll get to Filters.
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Hope this helps! 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@TheoC Thank you for your response! This unfortunately works the same way as my calculated column did, updates the data in the chart but still shows 31 days for February. 😞 Am I missing something here?
Hi @Ashley how have you structured your Date table?
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@Ashley if you don't have a Date table, I recommend doing a simple one using the below link as it will provide a significant amount of "stress relieft" - Creating a simple date table in DAX - SQLBI
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@TheoC Thank you, I created a simple and clean date table and created a relationship with my Inventory table. Now the relative date time filter works properly.
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
96 | |
89 | |
73 | |
61 | |
58 |