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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bilingual
Helper V
Helper V

Group calculated measures

Hi, i have made a measure which calculates percentage of total:

 
Pct. af total = DIVIDE(SUM(Data[Antal rejser]);CALCULATE(SUM(Data[Antal rejser]);ALL(Data[Name]));BLANK())
 
I want to create a new group which sum up all calculated values which are less than 0,5 pct and call the group "Names with <=0,5 pct.", all other values just keep their Names, how do i manage it? 
 
Kind regards Dan
 

 

1 ACCEPTED SOLUTION

for going by greg suggestion to create a disconected table just make a table that returns a single column and row with null value and just that table as disconected, 

example: 

Table = DataTable("Name", STRING,  
               "null", STRING  ,{  {"1","0"}  }  )  
 
and the measure have home section to define in the table you want to home it them apply greg indstructions for the measure itself, or use the Dax estudio or tabular to create the group. 




Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
v-henryk-mstf
Community Support
Community Support

Hi @bilingual ,


Whether the advice given by @StefanoGrimaldi  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

Greg_Deckler
Super User
Super User

@bilingual Create a disconnected table with your group names and a measure along the lines of:

Measure =
  VAR __Table = SUMMARIZE('Table',[Name],"__Pct",[Pct. af total])
  VAR __Group = MAX('DisconnectedTable',[Value])
RETURN
  SWITCH(__Group,
    "Names with <=0,5 pct.",SUMX(FILTER(__Table,[__Pct]<0,5),
    // more categories here
  )

 

 



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

Hi Stefano, thanks however i have problems making the Disconnected table, i can not make it to list the names,  how do i do it?

Kind regards Dan

for going by greg suggestion to create a disconected table just make a table that returns a single column and row with null value and just that table as disconected, 

example: 

Table = DataTable("Name", STRING,  
               "null", STRING  ,{  {"1","0"}  }  )  
 
and the measure have home section to define in the table you want to home it them apply greg indstructions for the measure itself, or use the Dax estudio or tabular to create the group. 




Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




StefanoGrimaldi
Resident Rockstar
Resident Rockstar

you can use calculation groups on power BI dax studio or tabular editar: 

https://www.youtube.com/watch?v=_j0iTUo2HT0

https://community.powerbi.com/t5/Community-Blog/How-And-When-To-Use-Calculation-Groups-In-Power-BI/b... 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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