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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MikePowerBI
Helper II
Helper II

Date filter does not update x-axis when using date hierarchy

Hi there,

 

I have a line and clustered column chart and a date filter. The same date column called "Initiation Date" is used for both the date filter and the x-axis of the chart. 

 

When using the date hierarchy option to format the x-axis, the date filter correctly filters the data, but does not dynamically filter the x-axis (please see screenshots below for comparisons). 

 

Does anyone know how to fix this?

 

Date hierarchy:

MikePowerBI_0-1645826065264.pngMikePowerBI_1-1645826084662.png

 

Not using date hierarchy:

MikePowerBI_2-1645826108913.pngMikePowerBI_3-1645826148584.png

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @MikePowerBI ,

 

I think this is caused by your INVs Initiated and Avg.INVs per Batch returning 0 values (or not blank) for the filtered out dates section.

For example, if I use the following measures separately as values for the chart, one will filter the x-axis correctly, while the other will not be filtered because January, February, March... have a return value of 0.

Note: This situation exists between the date slicer of type "Between" and the date hierarchy.

 

vkkfmsft_1-1646109652693.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @MikePowerBI ,

 

I think this is caused by your INVs Initiated and Avg.INVs per Batch returning 0 values (or not blank) for the filtered out dates section.

For example, if I use the following measures separately as values for the chart, one will filter the x-axis correctly, while the other will not be filtered because January, February, March... have a return value of 0.

Note: This situation exists between the date slicer of type "Between" and the date hierarchy.

 

vkkfmsft_1-1646109652693.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-kkf-msft thank you for your response and for the detailed explanation! 

 

I did some troubleshooting and found that my Avg. INVs/Batch measure was causing the problem because it was written as Measure = IF(X/Y = BLANK(), 0, X/Y). This is because I am using the measure for a data card visual on another dashboard where my client does not like to see "BLANK()" on the data card. 

 

I created another measure without the if statement and this resolved the issue. Thank you again!

AlexisOlson
Super User
Super User

I'm guessing you haven't created a date dimension table and it's automatically building one for you. I'd recommend creating one and using that dimension table for your slicer instead.

 

I recommend reading this for more information:

https://radacad.com/do-you-need-a-date-dimension

Hi @AlexisOlson thank you for your reponse and for providing the great resource.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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