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
bilingual
Helper V
Helper V

Dynamic grouping of percentage of total

NameNumbersPercentage of totalNew Column
A15037,5 
B10025 
C10025 

 

D

5012,5 

 

Hi i have made this formula, i want to create a dynamic value, so i can group the percentage according to my needs

For example here, i want to group all values with Less than/equal to 25 percent and name the group "Less than/equal to 25 percent". I want to make it dynamic, so i can auto group according to if i for example change to Less than/equal to 15 percent, so i need a dropdown menu as well

Can somebody help me?

Kind regards Daniel

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @bilingual ,

 

Here I suggest you to try "What if Parameter" to create a percent slicer.

RicoZhou_0-1664184844226.png

Then create a table visual to show name list whose percentage is less than or equal to select in parameter.

Dynamic Title measure is as below.

Title =
VAR _Parameter =
    SELECTEDVALUE ( Parameter[Parameter] )
VAR _Title = "Less than/equal to" & " " & _Parameter & " " & "percent"
RETURN
    _Title

RicoZhou_1-1664184995753.png

Measure:

Filter = 
VAR _Parameter =
    SELECTEDVALUE ( Parameter[Parameter] )
RETURN
    IF ( SUM ( 'Table'[Percentage of total] ) <= DIVIDE ( _Parameter, 100 ), 1, 0 )

Add this measure into visual level filter and set it to show items when value equal to 1.

Result is as below.

RicoZhou_2-1664185082897.png

RicoZhou_3-1664185095917.png

 

Best Regards,
Rico Zhou

 

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

Hi Rico, the challenge is that the percentage of Total is not a column but a measure = 

"pct. af total = DIVIDE(SUM(Data[Antal rejser]);CALCULATE(SUM(Data[Numbers]);ALL(Data[Name]));BLANK())"
 
I want to be able to dynamic group the percentage of total according to periode, so it will adjust whether it is for example January or February,
Greg_Deckler
Super User
Super User

@bilingual Create a new table using Enter Data query and populate it with the names of your groups. Make sure it is disconnected or unrelated to any other tables in your data model. You can then use that for your dropdown menu and construct the appropriate measure. More specifics would help in being less general with a solution. Are you simply trying to filter that table depending on what group you select?

 

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg, unfortately it is the other way round, i want to rank the Names according to their size of the percentage of the total.

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.