Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
granvilj
Frequent Visitor

trying to filter my results using a virtual table

Hi, i have been trying to solve this problem for several days and looking for assistance. I am trying to provide a report with 2 visuals.  The first visual will show all the Projects that have a total usage for the month greater than a minimum usage filter specified by the user with a slicer.  The second visual is a list of the Products and their sum usage filtered by only the projects that are equal or greater than the minimum usage filter.  I am able to get the projects visual to work by creating a measure to check if the total usage is equal or greater than the slicer value and then filter the visual by that check.  My problem is that i can not figure out how to get the Projects visual to display correctly. 

 

I tried to create the following measure but the visual is not correct.  the grand total value in the table is correct but the table keeps filtering the list to only show Products that have total usage greater than the slicer value instead of showing all products regardless of their usage for the projects that meet my criteria.

 

 

 

Credits by project min credit filter =
var _ProjectFilterTable =
FILTER(
  ADDCOLUMNS(
     SUMMARIZE(
        UsageTable,
        UsageTable[ProjectID]
      ),
      "UsageFilterCheck", IF([TotalUsage] >= SELECTEDVALUE('Usage Filter'[Value]), 1, 0)
      ),
      [UsageFilterCheck] = 1
)

var _ProjectFilterList =
SUMMARIZE(
   _ProjectFilterTable,
   UsageTable[ProjectID]
)

return
CALCULATE(
   [TotalUsage],
   TREATAS(_ProjectFilterList, UsageTable[ProjectID])
)

 

 

 

Here is an example of my data table:

DateProduct IDProject IDUsage
Jan 11234ABC50
Jan 19876ABC200
Jan 11234XYZ25

 

0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.