Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
brightcitrus
Frequent Visitor

Remove unnecessary date points? DAX measures using ALLSELECTED

Hello PBI User Group,

 

I am facing a little challenge and I would greatly appreciate your help.

 

I created two measures (average and standard deviation) to create the two measures I really need to graph, which are the control limit and the warning limit. However, when I plot my limits, all my dates appear and my date slicer is no longer filtering the graph. I suppose this is because I am using the ALLSELECTED filter? I tried changing it but this is the only formula that is giving the right values for my limits. Please find below the formulas and the screenshots.

 

Average = calculate(AVERAGEX('Month-Year',Complaints[Disposables Complaint Rate]),ALLSELECTED(Complaints))
 
Rate STD = calculate(STDEVx.p(filter('Month-Year','Month-Year'[Mo-Yr]='Month-Year'[Mo-Yr]),Complaints[Disposables Complaint Rate]),ALLSELECTED(Complaints))
 
Capture2.JPGCapture.JPG
 
As you can see, my limits are plotted fine but I have all these unnecessary date points. How can I get rid of the unnecessary dates in the x axis please and have the date slicer filter the line chart at the same time?
 
Thank you very much for your help.
6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @brightcitrus 

 

Do you mean you'd like to remove the unnecessary axis values? please make sure the "Show items with no data" is not enabled in the axis filed.

0001.PNG

also, you can use the filter pane, to filter the relative valuable dates of your axis. 

 

0002.PNG

You can modify the slicer into the same periods with filter panel as well. 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hello @v-diye-msft 

 

Thank you very much for your suggestions. I am aware of these filtering features, however the output is still not the desired output.

 

When I unselect the unnecessary date points, I am still left with a graph that is not responsive to the date filter since I am using ALLSELECTED. The graph does not "zoom out" or "zoom in" on the dates selected. Also, show items with no data is unchecked and the date points still show.

 

I think that there is somthing wrong with my formula. Could you please help me fix it?

 

Thank you very much for your help.

Hi @brightcitrus 

 

Would you mind kindly sharing your dummy pbix that I can check it furtherly? thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
JarroVGIT
Resident Rockstar
Resident Rockstar

Please share your datamodel, is Month-Year a designated datetable?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Are the flat lines the measures you provided or other measures?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The flat lines are the limits, red is control limit and orange is the warning limit. They use the average and the standard deviation formulas I posted. Control limit = average + 3*standard deviation.

 

Also, Month-Year is the data table. How can I share my data model? What information do you need exactly?

 

Thank you for your help.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.