Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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.
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.
User | Count |
---|---|
84 | |
82 | |
66 | |
52 | |
46 |
User | Count |
---|---|
100 | |
48 | |
42 | |
39 | |
38 |