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
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

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 works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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 works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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
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.