Forum Discussion
How to Hide Useless Date Choices In Filter Box and X Axis
- 4 years ago
Hi, Anonymous
You can try formulas like the following:
inf = CALCULATE(Min('Table'[Date]),FILTER(ALL('Table'),'Table'[Value1]<>0||'Table'[value2]<>0))sup = CALCULATE(Max('Table'[Date]),FILTER(ALL('Table'),'Table'[Value1]<>0||'Table'[value2]<>0))filter = IF(SELECTEDVALUE('Table'[Date])>=[inf]&&SELECTEDVALUE('Table'[Date])<=[sup],1,0)Then apply measure 'filter' to the filter pane of your chart.
Please check my attachment for more detail.
If it doesn't work, please share your sample file for further research.
Best Regards,
Community Support Team _ Eason
Anonymous I'm bit surprised why they are showing in the first place, what is the measure that you are using? Also, did you selected show all items with no data
This is a simple column chart linked one excel table, I use Excel column "cn_date" as time axis and the count of row with same day as measure. When I drilled down the column chart to show the sum count of each month, Power BI shows all months in the year on X axis, no matter it is blank or not.
- v-easonf-msft4 years ago
Community Support
Hi, Anonymous
You can try formulas like the following:
inf = CALCULATE(Min('Table'[Date]),FILTER(ALL('Table'),'Table'[Value1]<>0||'Table'[value2]<>0))sup = CALCULATE(Max('Table'[Date]),FILTER(ALL('Table'),'Table'[Value1]<>0||'Table'[value2]<>0))filter = IF(SELECTEDVALUE('Table'[Date])>=[inf]&&SELECTEDVALUE('Table'[Date])<=[sup],1,0)Then apply measure 'filter' to the filter pane of your chart.
Please check my attachment for more detail.
If it doesn't work, please share your sample file for further research.
Best Regards,
Community Support Team _ Eason