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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How do I apply a filter that relates to a more granular lever than the one I am reporting on?

Reported Splits on Bar Chart with drill down ability to get form DMA to City 
DMA (Denver Selected)Distribution of DMA (Denver)City (in Denver)Distribution of City (in Denver)
Denver235Denver70
Denver235Littleton30


However, I want to put a limit on showing each DMA or City based on if they pass the distribution rule when it is also split by market so pub and cafe for example.

Littleton For example passes Distribution > 30 at a more granular level so is showing on my bar chart.
However, when split by market Littleton bars < 30 and Littleton Cafes < 30 so I do not want Littleton to show on my bar chart but i want to be able to do this without putting market in my ledgend or showing on the chart at all, just a filter or some kind of calculated column maybe? 

Thanks in advance! 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks all,

 

I figured this out using a SUMX

 

Distribution_Segment_Limit =
SUMX(VALUES('Table'[Segment]),
[Distribution])
 
Where 

Distribution =
VAR Dist = DISTINCTCOUNT('Table'[ID])
RETURN IF (Dist >= 30,Dist,Blank())

From there I was able to plot my regions on a barchart without putting segment into the breakdown but the distribution was not included if it did not pass the distribution rule criteria for region and segment.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@Anonymous, would you mind giving us a more understandable description with some simple data and the result you want?

This will help us solve your problem more easily and quicker.

Thanks.

Best
D
Anonymous
Not applicable

Thanks all,

 

I figured this out using a SUMX

 

Distribution_Segment_Limit =
SUMX(VALUES('Table'[Segment]),
[Distribution])
 
Where 

Distribution =
VAR Dist = DISTINCTCOUNT('Table'[ID])
RETURN IF (Dist >= 30,Dist,Blank())

From there I was able to plot my regions on a barchart without putting segment into the breakdown but the distribution was not included if it did not pass the distribution rule criteria for region and segment.
Greg_Deckler
Super User
Super User

I'm not at all clear on this. You could use the Filter pane to get rid of cities.

 

If you absolutely, positively have to do it in DAX, you can start your DAX code with something like:

 

Measure =

  VAR __Table = FILTER('Table',[City] <> "Some city" && [City] <> "Some other city")

 

Then perform your calculations against __Table

 

Or, at the end of your measure you could do something like:

 

RETURN

  IF(MAX('Table'[City]) = "Some city" || MAX('Table'[City]) = "Some other city",BLANK(), <whatever calculation>



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.