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
Tony5
Helper I
Helper I

Measure not following a slicer from a related table

So basically, the line in the chart below isn't being filtered.

Any thoughts on what I'm doing wrong?

PBIX here: https://www.dropbox.com/s/bogm95qwp7bbng8/Filter%20with%20All.pbix?dl=0

 

Annotation 2020-01-07 084315.png

 

1 ACCEPTED SOLUTION

Hi,

Edit your measure to

_Pct_Data_All = if(ISBLANK([_Pct_Data]),BLANK(),CALCULATE([_Pct_Data],ALLEXCEPT(Table1,_Filter_DateTime[Ingested_DateTime])))

The second visual should not display properly.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

In the first chart, the dashed line has been created from the Analytics button the visualisation pane.  As far as i know, that line does not respond to filters.  In your second graph, you have created a measure to generate the line which i see responds to changes you make in the date slicer.  So isn't the second chart giving you your desired result?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur Thank you very much for the response.

Strangely enough, the 1st chart (with the built-in average line) actually responds to the filter. Problem is, the built-in average is doing an average of the average for some reason.

The 2nd chart provides me with the correct (accurate) overall average line. However, notice that my filter in the screenshot supposedly starts at Dec 19. Yet the line starts way back in November. For some reason, it's not looking at the filter.

Hi,

Edit your measure to

_Pct_Data_All = if(ISBLANK([_Pct_Data]),BLANK(),CALCULATE([_Pct_Data],ALLEXCEPT(Table1,_Filter_DateTime[Ingested_DateTime])))

The second visual should not display properly.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur It's working now! So all this time, I was just missing the ISBLANK condition.

 

Thank you so much good sir. Really appreciate the enlightenment. 😊

You are most welcome.  Thank you for your kind words.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

Move it to date of _filter_date_time and will start changing. Also, create this table based on the calendar function. Instead of

SUMMARIZE.

To get the best of the time intelligence function or time-related analysis. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

 

 

 

@amitchandak : Thank you very much for the response. Apologies, but may you expound on "Move it to date of _filter_date_time". How do I do that?

I tried creating a new table using the calendar function, unfortunately, my measure still refuses to follow the new filter.

Please check

https://www.dropbox.com/s/j7drfgp8iu10br8/Filter%20with%20All.pbix?dl=0

 

Not yet done the calendar date. But check the slider

I see that the 1st chart now has the calendar table's date as an axis. However, my issue with the build-in mean line is that it seems to just take the average of the average. (My expected mean is on the card on the right side of the dashboard.)

 

Or am I missing something?

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.