We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
How to have the total of a measure, so I can do the GT in DAX .
Solved! Go to Solution.
Hi @Anonymous ,
There are different ways to find the total measure in different scenarios. It depends on your application scenario. For example, if I want to get the summation result of the corresponding fields in the hierarchy in the matrix visual instead of the total, I can use functions like HASONEVALUE.
M_ =
VAR a =
CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) )
VAR b =
CALCULATE (
MAX ( 'Table'[Value] ),
ALL ( 'Table' ),
'Table'[Category] = MAX ( 'Table'[Category] )
) / a
RETURN
IF ( HASONEVALUE ( 'Table'[ID] ), b, "which you want to calculate" )
Also, you can read related blog as below.
Power bi measure divide + 9 examples - EnjoySharePoint
If the problem is still not resolved, could you further describe your requirements, provide the relevant test data and the desired results. I will answer your questions as soon as possible. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
There are different ways to find the total measure in different scenarios. It depends on your application scenario. For example, if I want to get the summation result of the corresponding fields in the hierarchy in the matrix visual instead of the total, I can use functions like HASONEVALUE.
M_ =
VAR a =
CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) )
VAR b =
CALCULATE (
MAX ( 'Table'[Value] ),
ALL ( 'Table' ),
'Table'[Category] = MAX ( 'Table'[Category] )
) / a
RETURN
IF ( HASONEVALUE ( 'Table'[ID] ), b, "which you want to calculate" )
Also, you can read related blog as below.
Power bi measure divide + 9 examples - EnjoySharePoint
If the problem is still not resolved, could you further describe your requirements, provide the relevant test data and the desired results. I will answer your questions as soon as possible. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Can you share some more details?
Try something below
Grand Total:
Measure = CALCULATE(SUM(TableName[Value]),ALL(TableName))Percentage of Grand Total:
Measure =
VAR vValue = SUM(TableName[Value])
VAR vTotalValue = CALCULATE(SUM(TableName[Value]),ALL(TableName))
RETURN
DIVIDE(vValue ,vTotalValue ,0)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 66 | |
| 41 | |
| 34 | |
| 24 |