cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jxp73
Frequent Visitor

Filter and compare by departments

Friends,

 

I have about 35 departments with my unit. I need to compare their expenditures. When I put department into the line chart it looks terrible. I would like to be able to click the department in the table and have the lines show up to compare. 

 

I believe this is a filtering but I cant seem to get it right with this: 

 

SlicerCheck = =if(calculate(distinctcount([SlicerColumn]),allselected([SlicerColumn]))=1,"Y","N")

 

I dont know where to apply the filter correctly....

 

Thank you

3 REPLIES 3
mwegener
Super User
Super User

Hi @jxp73 ,

 

has your problem been solved?

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website


mwegener
Super User
Super User

Hi @jxp73 

 

try this

 

SlicerCheck = IF(COUNTX(ALLSELECTED('Table'[SlicerColumn]),'Table'[SlicerColumn]) = 1,"Y"),"N")

 

 

 

Measure = IF(COUNTX(ALLSELECTED('Table'[Department]),'Table'[Department]) = 1,SUM('Table'[Value]),BLANK())

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website


JarroVGIT
Resident Rockstar
Resident Rockstar

Hi @jxp73 ,

 

Can you explain a bit more about what the problem is? Where are you using the DAX that you are providing? Is it possible to not use a table selection for this but a Slicer selection? You can show a table next to the slicer with values you want your users to be aware of when they are slicing the data, and using a slicer makes sure the other departments are not showing in the line chart. When selecting from a table, you have two disadvantages:

1. You need to hold the Ctrl key to select multiple rows.

2. The other lines are faded but not completely invisible.

Based on what you are sharing I would recommend implementing a slicer somehow and not use a Table visual as a filter mechanic.

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors