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

Ignore Visual Level Filter

Hello,

 

I have a data set with monthly totals of subscribers.  I am using a max date filter to display a bar chart with only current month totals by user type.  I also have a line chart to show growth over time.  The problem I have run into is that if I want to use the user type bar chart to filter the growth chart (to view growth within specific user types), the max date filter on the user type chart causes the growth chart to only plot the current month (max date).  I have tried to use the below DAX expression in the line chart to ignore the max date, but have not had any luck with it:
TotalSubscribers_Fixed = calculate(SUM('Table'[End of Period Subscribers]),ALL('Table'[Max Date]))
 
any help would be greatly appreciated!
1 ACCEPTED SOLUTION

Hi @thrillhouse 

I think you want to filter your Line chart by bar chart. Your bar chart should add user type(A,B) on Axis and Legends, then you select A, Line chart will only show values for A.

My Sample:

1.png

...

I build a bar chart and let it show the values in MaxDate's month by measure.

Values in MaxdateMonth = 
VAR _MaxDate = MAXX(FILTER(ALL(Sheet38),Sheet38[User]=MAX(Sheet38[User])),Sheet38[Date])
VAR _MAXDateYear = YEAR(_MaxDate)
VAR _MAXDateMonth = MONTH(_MaxDate)
Return
SUMX(FILTER(Sheet38,YEAR(Sheet38[Date]) = _MAXDateYear&&MONTH(Sheet38[Date]) = _MAXDateMonth),Sheet38[Value])

Bar chart:

2.png

Then build a Line chart and have a test.

By default:

3.png

When I select A in bar chart, my line chart will show all values for A.

4.png

 

Best Regards,

Rico Zhou

 

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

Hi @amitchandak,

 

It's a little difficult for me to dummy up sample data. But my problem lies in that the only field I have to display totals is an "end of month total subscribers".  So if I want to show current totals, I have to use a max date.  Then, to plot each month's totals to show growth, I am unable to use the chart with current totals by user type to filter the growth chart by user type because the max date filter from the usertype current totals chart carries over into the growth chart and it now only plots the max date totals.

Hi @thrillhouse 

I think you want to filter your Line chart by bar chart. Your bar chart should add user type(A,B) on Axis and Legends, then you select A, Line chart will only show values for A.

My Sample:

1.png

...

I build a bar chart and let it show the values in MaxDate's month by measure.

Values in MaxdateMonth = 
VAR _MaxDate = MAXX(FILTER(ALL(Sheet38),Sheet38[User]=MAX(Sheet38[User])),Sheet38[Date])
VAR _MAXDateYear = YEAR(_MaxDate)
VAR _MAXDateMonth = MONTH(_MaxDate)
Return
SUMX(FILTER(Sheet38,YEAR(Sheet38[Date]) = _MAXDateYear&&MONTH(Sheet38[Date]) = _MAXDateMonth),Sheet38[Value])

Bar chart:

2.png

Then build a Line chart and have a test.

By default:

3.png

When I select A in bar chart, my line chart will show all values for A.

4.png

 

Best Regards,

Rico Zhou

 

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

aj1973
Community Champion
Community Champion

If I may add to what's been said in this thread:

It is understandable that members don't want to share their Pibx file for security reasons. But it is very time consuming for the community to quickly understand the issue and respond faster. For this I suggest attaching or uploading (Onedrive, Google dirve, Dropbox...) a Dummy Pbix file. 

Here is how to make a dummy Pibx file:

- Save your Pbix file under Dummy.pbix

- Locate the tables that are related to the issue and Delete the rest.

- On the remaining tables delete all columns that are not related to the issue

- On the remaining columns select a few rows that are related to this issue and delete the rest

- If some sensitive datas are still there then replace them by XXXXXX for an example.

 

By doing so you not only help us understand better your issue but also to get it solved many times faster.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

amitchandak
Super User
Super User

@thrillhouse ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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