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
Anonymous
Not applicable

Slicer to show aggregated data

Hello,

 

I have a database which looks like this:

aggregate slicer.png

I would like to create a slicer which filters a table based on the number of matches a player played.

If I put the "total_matches_sum" coloumn into a slicer I will see values from 5 to 17.

 

The problem is that for example the player with the playerId 101565 played in 4 seasons so his matches add up to 43 matches but this value will not appear on my slicer. 

 

Is there a way to show this aggregated value on a slicer without creating another supporting table where I aggregate these numbers? 

 

Thanks!

10 REPLIES 10
amitchandak
Super User
Super User

@Anonymous , Measure slicer is now allowed. But you can use a visual level filter there.

Anonymous
Not applicable

Hey,

 

If you are using importing, you can create a calculated column with totals and use that as a slicer. It would solve the problem of being able to use the slicer, but it is not a best practice if you ask me. 

 

Additional option may be create an aggregated table, link it by key to the existing one and again use the aggregated values as a slicer. You need to consider filtering directiong from agg table to fact. 

 

I hope that helps.

 

Kind regards,

Yuliyan

Anonymous
Not applicable

@Anonymous 

 

My intention would be to still be able to filter my table by seasons as well so I would like to avoid making an aggregated table. But it seems like to be able to:

A) filter the table by season

B) show aggregated values on my slicers when all seasons are selected and show only the specific season's values when only one season is selected

are two things that block each other.

 

But thanks for the advice, I will consider them.

Hi @Anonymous ,

 

Is below what you need?

Annotation 2020-07-29 155056.pngAnnotation 2020-07-29 155112.png

If not,could you pls show me your expected output?

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

Hi @v-kelly-msft 

 

yes but instead of a card visual I would like to see the aggregated number on a slicer (slider).

 

What I want is to create a slider-slicer which shows the minimum and maximum values of matches played by any player in the selected season. The minimum and the maximum value can belong to different players. And if I select 2 or more seasons I want my slider to show these aggregated (by player) minimum and maximum values for the selected seasons.

 

Kind regards,

 

Marton

Hi @Anonymous ,

 

Sorry but measure cant be put in Slicer,I have a workaround for you.

First calculate out the sum value for each season:

Sum by seasonid = SUMX(FILTER('Table','Table'[seasonid]=EARLIER('Table'[seasonid])),'Table'[total_matches_sum])

And a measure as below:

Measure = SUMX(ALLSELECTED('Table'),'Table'[total_matches_sum])

Then put the seasonid and the sum column in 2 slicers,measure  in card:

Annotation 2020-07-30 103509.png

Not perfect,hope could help.

Attachment is the .pbix file.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Anonymous
Not applicable

Hi @v-kelly-msft 

 

thanks for the effort, unfortunately I can't use this in my actual report is built up on principles which block this workaround.

Many thanks!

Hi @Anonymous 

 

The only way this can be done ( I think ) is by:

https://www.daxpatterns.com/dynamic-segmentation/

But this involves creating segmentation table.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Unfortunatly no, as the slicer value has to return a value from specific column.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Anonymous
Not applicable

Hi @Mariusz ,

 

ok, thanks for the quick answer. 

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.