Forum Discussion
How can I display values that do not include an excluded value?
I have a database with project id and sponsor id, if in the visualization I want to show the projects where a specific sponsor does not participate (for example if I have 10 projects and in projects 3 to 7 sponsor 1 participates, in the visualization It only shows me projects 1,8,9 and 10) how can I do this?
Taking into account that in the base I have more than 1,000 projects and 200 sponsors and I want to have the filter for those 200 sponsors
Hi joangotr ,
Based on your description, Please try the following steps:
My Sample:1. Please try code as below to Create a Calculated table.
Table 2 = VALUES('Table'[Sponsor ID])2. Use the following code to create two Measures.
Measure = IF(MAX('Table'[Sponsor ID]) in ALLSELECTED('Table 2'[Sponsor ID]), 1, 0)Measure 2 = SUMX(FILTER(ALLSELECTED('Table'),[Project ID] = MAX('Table'[Project ID])), [Measure])3. Select your visual object, put the measure in the “Filters on this visual” section, and filter it by “Measure2 is 0”.
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- Ritaf1983Super User
Hi joangotr
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - v-weiyan1-msftCommunity Support
Hi joangotr ,
Based on your description, Please try the following steps:
My Sample:1. Please try code as below to Create a Calculated table.
Table 2 = VALUES('Table'[Sponsor ID])2. Use the following code to create two Measures.
Measure = IF(MAX('Table'[Sponsor ID]) in ALLSELECTED('Table 2'[Sponsor ID]), 1, 0)Measure 2 = SUMX(FILTER(ALLSELECTED('Table'),[Project ID] = MAX('Table'[Project ID])), [Measure])3. Select your visual object, put the measure in the “Filters on this visual” section, and filter it by “Measure2 is 0”.
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.