cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

How to create measure instead of custom tables/columns

Hi all,

 

I have two tables like : 

skondi_0-1605019842372.png

 

 

I have created a Custom Table for getting my calcuations :

skondi_2-1605019969191.png

 

Summary = SUMMARIZE('Fact','Fact'[MUID],'Fact'[Category],"Frequency",COUNTX('Fact',COUNT('Fact'[TBID])),"MF",COUNTX('Fact',COUNT('Fact'[TBID]))* (ALLSELECTED(tb_weights[Weight])))
 
Here how can I create a measure which can get the total Calculations(highlighted) for every MUID like this ? 

 It Should be a measure not a visual.

skondi_0-1605022125234.png

 

 

 

1 ACCEPTED SOLUTION
Microsoft
Microsoft

Hi @skondi ,

 

1.Create a new table. Then create a calculated column in the new table. There needs to be a relationship between the two tables.

Table = ADDCOLUMNS('Fact',"Weight",RELATED(tb_weights[Weight]))
MF = CALCULATE(SUM('Table'[Weight]),ALLEXCEPT('Table','Table'[MUID]))

 1.png2.png

 

2.Create another new table. This new table is the result.

Summary = DISTINCT(SELECTCOLUMNS('Table',"MUID",[MUID],"MF",[MF]))

3.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
Microsoft
Microsoft

Hi @skondi ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

Microsoft
Microsoft

Hi @skondi ,

 

1.Create a new table. Then create a calculated column in the new table. There needs to be a relationship between the two tables.

Table = ADDCOLUMNS('Fact',"Weight",RELATED(tb_weights[Weight]))
MF = CALCULATE(SUM('Table'[Weight]),ALLEXCEPT('Table','Table'[MUID]))

 1.png2.png

 

2.Create another new table. This new table is the result.

Summary = DISTINCT(SELECTCOLUMNS('Table',"MUID",[MUID],"MF",[MF]))

3.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors