Forum Discussion
ALLSELECTED OR NOT?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
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/1447523
Position table:
| PortfolioId | TotalValue |
| 1 | 1000 |
| 2 | 2000 |
| 3 | 3000 |
Portfolio table:
| Id | Company | Investment |
| 1 | Test1 | Apple |
| 2 | Test2 | Amazon |
| 3 | Test3 | Arm |
Report:
| Company | Investment | Total Value | Overall |
| Test1 | Apple | 1000 | 4000 |
| Test3 | Arm | 3000 | 4000 |
If I use the following day for Overall:
CALCULATE( SUM(TotalValue), REMOVEFILTERS(Portfolio[Investment]), ALLSELECTED(Portfolio[Company])
I get the Report table above, which is great, BUT if i only select "Investment = A" in the filter "Filters on this visual" I only get Overall = 1000, because it looks like its summing within the selected investments.
Model example:
Works when selecting 2 companies and all investments within the companies.
When then selecting only 1 investment, should expect to see 4000, but shows only value within the 1 investment selected, need to see the 4000
- lbendlin2 years ago
Super User
- faldiwan_ar2 years agoFrequent Visitor
Hi,
Im expecting to see 4000, not 6.
So ive selected Apple like you did and in the company filters selected Company Test1 & Test2, so i should expect to see the sum of the values for both Test1 & Test2.
Your result is returning all 3 companies, when i only selected 2 in my filter
- lbendlin2 years ago
Super User
That's a "wash me but don't make me wet" scenario. You need to use disconnected tables and measures.