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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
swami84
New Member

Date Slicer Does not Update Date Axis (Due to SMA Measure)

 

Hi,

     I am rather new to Power BI. I created a line plot and added Simple Moving Average (SMA) measure as follows

 

 

SMA (31 day) = AVERAGEX(DATESBETWEEN(aycb_auth_rate[customer_created_date].[Date], MAX(aycb_auth_rate[customer_created_date]) - 30, MAX(aycb_auth_rate[customer_created_date])), CALCULATE(SUM(aycb_auth_rate[approved])/COUNT(aycb_auth_rate[order_status_formatted])))

 

 

I also added a date slicer. When I move the date slicer to specific dates, the X-axis remains the same and does not update. If I remove the SMA measure, it updates just fine. I am not sure how to edit SMA measure to enable axis updates with slicer. Please help!

swami84_0-1667830665938.png

 

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

Hi @swami84 ,

 

This problem is caused by the date with the hierarchy, just change it to Date.

vjianbolimsft_0-1667983326873.png

Final output:

vjianbolimsft_1-1667983450028.png

 

 

Best Regards,

Jianbo Li

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

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @swami84 ,

 

This problem is caused by the date with the hierarchy, just change it to Date.

vjianbolimsft_0-1667983326873.png

Final output:

vjianbolimsft_1-1667983450028.png

 

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-jianboli-msft
Community Support
Community Support

Hi @swami84 ,

 

Which table data is used in the fields of your slicer, the fact table or the date table?

Which field is used in the x-axis of your line chart?

Please try to create a slicer using the date in the date table as the field for the X-axis and use that field.

 

If that does not work, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I believe I am using the fact table field in slicer

I am using the same field (customer created date) for both X-axis and slicer

The pbix file can be found here
https://drive.google.com/file/d/1F1xqe31MNVkNjqyqFvdlBhdGft2wrlF1/view?usp=share_link

Thanks again for your help

 

Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.