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 Experts,
I want to show 3 years data in a line chart in x-axis, by a year-month combination lets say starting from 2019 Jan and then showing only 2019 July like wise all the 3 years months will be fitted in a single line chart so that in between months were hidden in showing. My main intention is if we present like this way it will be more engaging for the end user. It is a easy one I believe but I am new to Power BI.
Any help is appreciated. Thanks in advance.
if I understand correctly you can try to create a calculated column on the data table.
Sign with 1 only the month that you want to show and with 0 the others.
Then filter the x axis with the 1 values only.
You can write a dax like this:
ShowValues = SWITCH(Datatable[MonthNumber], 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 1, 0)
Let me now if it is a solution.
If you post a pbix i can try to resolve on it.
@Anonymous , You can change axis type to categorical
Hi Amith,
Thanks for the quick reply.
It is not allowing me to do. Currently I created a calculated table with year month , year, month combination columns writing a dax. I am using that year month combination column in our line chart x axis. Since the column has many values ranging from 2019, 2020,2021,2022 I am unable to show these with a gap interval of 6 months.
I am able to show these in x axis but with continuous month year combination.
I am wondering from the past 3 hours how to do so
Hi, @Anonymous
Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
99 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
163 | |
110 | |
61 | |
51 | |
40 |