- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a sum measure of a complicated measure
Hi,
I have created a measure called [Days].It gives me the below output when put in Matrix.
I want to create a measure called [Total Days] which will be the total of the [Days] Measure. However, Days is a measure and directly the Sum function cannot be applied.
I want the [Total Days] to work by totalling the Days in visualization. This can vary as it is a measure and the measure varies depending on the slicer selections.
For the above example I want to the new measure should have the value =124 . That is totalling everything present in [Days] Measure.
I tried to create a measure called SUMAX=
, but it only displays the total above. I cannot use this. I want to use the Total Days measure for yet another measure, which will essentially be Average Weighted= Divide(Days*Nursing CMI Real, Total Days)
The [Days} Measure is as follows-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Thank you for the reply. Based on you suggestion and with a few modifications, I finally got the solution. Because my data had multiple tables , Allselected could not be used directly so I had to modify it a bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Vatz8 , hello lbendlin, thank you for your prompt reply!
Based on your description, we suggest you use AllSELECTED function to remove context filters from columns and rows in the current query, while retaining all other context filters or explicit filters.
I have created a simple test for your reference:
TotalDays2 = SUMX(
ALLSELECTED('Table'),
[Days]
)
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Thank you for the reply. Based on you suggestion and with a few modifications, I finally got the solution. Because my data had multiple tables , Allselected could not be used directly so I had to modify it a bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SUMX(ADDCOLUMNS(SUMMARIZECOLUMNS(Table1[Skilled Stay Range],Table2[Full name],table3[Facility]),"Sum",CALCULATE([Days])), [Sum])
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is giving me incorrect answer. I tried your solution under measure Sumaaa .I need 124 across. I even tried to directlly use it in my final measure but does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To make it clearer, this is the output for measure Total Days I am looking for.
It should be 124 all across so that my calculation for Weighted average can be correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
second request:Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
05-02-2024 11:36 AM | |||
08-21-2024 08:53 AM | |||
08-23-2024 10:44 AM | |||
09-03-2024 01:57 PM | |||
07-17-2024 02:37 PM |
User | Count |
---|---|
22 | |
12 | |
10 | |
9 | |
8 |
User | Count |
---|---|
15 | |
15 | |
15 | |
12 | |
10 |