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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
sujitjena
Resolver I
Resolver I

Numeric Range Slicer based on aggregate data

Hi,

 

I have a report that shows aggregated FTE for a list if clients. I want the users to be able to choose a FTE range to filter clients. However, this doesnt work since the filters work on row level. I tried creating another table using summerize table concept and connect it but some how its missing something and it doesnt work. I have table name: Cost, Columns: "Client name" and "FTE".

 

Is this possible. Can someone help?

Screenshot.PNG

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @sujitjena 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Cost:

b1.png

 

FTE Slicer(a calculated table):

FTE Slicer = 
var sumtab = 
SUMMARIZE(
    Cost,
    Cost[ClientName],
    "Sum",
    SUM(Cost[FTE])
)
var tab = 
GENERATESERIES(
    MINX(sumtab,[Sum]),
    MAXX(sumtab,[Sum]),
    1
)
return tab

 

Measure:

Visual Control = 
IF(
    SUM(Cost[FTE])<=MAX('FTE Slicer'[Value])&&
    SUM(Cost[FTE])>=MIN('FTE Slicer'[Value]),
    1,0
)

 

Finally you may put the measure in the visual level filter to filter the result.

b2.png

 

b3.png

 

Best Regards

Allan

 

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
v-alq-msft
Community Support
Community Support

Hi, @sujitjena 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Cost:

b1.png

 

FTE Slicer(a calculated table):

FTE Slicer = 
var sumtab = 
SUMMARIZE(
    Cost,
    Cost[ClientName],
    "Sum",
    SUM(Cost[FTE])
)
var tab = 
GENERATESERIES(
    MINX(sumtab,[Sum]),
    MAXX(sumtab,[Sum]),
    1
)
return tab

 

Measure:

Visual Control = 
IF(
    SUM(Cost[FTE])<=MAX('FTE Slicer'[Value])&&
    SUM(Cost[FTE])>=MIN('FTE Slicer'[Value]),
    1,0
)

 

Finally you may put the measure in the visual level filter to filter the result.

b2.png

 

b3.png

 

Best Regards

Allan

 

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

This is great! Is there a way to make the slicer dynamic to the selected customer?

 

amitchandak
Super User
Super User

@sujitjena , If you need a slider on a measure then you need to follow the dynamic segmentation approach.

Refer if my video can help

https://www.youtube.com/watch?v=CuczXPj0N-k

 

or

segmentation

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

@amitchandak : Thanks for a quick reply. Bucketing can be used but the range is quite dynamic and it will change in future. What i want is to provide the users with a control to choose "between a range" in the slicer (shown in the screenshot)

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.