Forum Discussion
Hide future month from my graph
One would think this is not that hard but still I am having a hard time.
This is the case :
I already build a current period filter like :
Well the x-axis is correct now but all my lines became dots! Not what we want.
And also I cannot set the main measure to be bigger than 0 because the empty months from 2023 still should show.
Only 04-2024 and up should not be showing at this moment.
9 Replies
- amitchandak
Super User
rpinxt , Please check value of current period
Hope current period like = Maxx(allselected(Table), Table[Date])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- rpinxt
Solution Sage
amitchandak could you explain bit more what you mean with :
Hope current period like = Maxx(allselected(Table), Table[Date])
Do you mean this line where I have Current period:
Current Period Filter =IF(MAX(dimDate[Date]) <= [Current Period],"Show","Hide")To change my measure [Current Period] with the measure you suggest?
- AnonymousNot applicable
Hi, rpinxt
You can turn off the show items with no datas option on the date field of the X-axis as shown in the image below:
The effect of turning off this option is as follows:
It would be great if it helps you.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- rpinxt
Solution Sage
Hi Anonymous no this will also not help unfortunately.
Because if you do this also the blank periode in the year 2023 will be gone.
I only want to hide the period of 2024 which are in the future.
- AnonymousNot applicable
Hi, rpinxt
Thank you very much for your reply. I did a diagram and it originally looked like this:
I did this by putting the year of the hierarchy in the page filter, as shown in the image below:
- rpinxt
Solution Sage
All these suggestions led me to a new approach make just a Period Filter.
And I really thought I had done it :
This is what you would want. Everything after 03-2024 should be hidden.
But in a graph......
My lines are again gone!
Apparently this solution messes with my DPMO avg line en my UCL line for whatever reason....
This is how it should look:
But for these averages it needs the full time line to calculate te average.
So most likely there is no good way to not show the future periods and still have the correct lines.
- AnonymousNot applicable
Hi, rpinxt
Thank you very much for your reply, you can try the following two ideas:
1. You mentioned that these averages of yours need to be calculated based on a complete timeline. Therefore, you can create a calendar table that establishes the appropriate relationship between this calendar and your original table. To recalculate your averages, the timeline you rely on is the calendar table.
2. When calculating the average, determine whether it is a future time, and if so, then set it to blank(). Or if you try to set up a UCLTest, the main logic is to determine whether it should be [UCL] or Blank() based on the results of the Period Filter, and then use this UCLTest in the chart. The DAX below is a reference:UCLTest = SWITCH ([Period Filter], "Show",[UCL], "Hide",BLANK () )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
- rpinxt
Solution Sage
Thanks Anonymous this looks interesting but I am afraid that I do not fully understand it....
I have a sample file here :
https://drive.google.com/file/d/1OJKNuQbbJzv6Y4V7F1cCSKlkszU1bBFz/view?usp=sharing
Maybe that is easier.