Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I wanted to ignore a filter applied by a visual slicer for the purpose of calculating totals on a measure and used ALLEXCEPT to ignore the filter applied by the slicer for the purposes of calculating the totals to display. The slicer filters a matrix to display only the Content IDs viewed by the selected CustomerID (s). I wanted a Total Customer Views measure to display the Unique Customer View Count for each Content ID (a simple distinct count on CustomerID will obviously return a result of 1 if you only have one CustomerID selected in the filter).
I used ALLEXCEPT to calculate the distinct total of all customer IDs that had viewed the content, this worked to properly calculate the total number of customers that had viewed each piece of content, but the matrix now displays counts ALL content IDs, not just total customer views of the cotent that the customer ID from the slicer had viewed. I had naively assumed that using ALLEXCEPT in a CALCULATE function only affected the numeric calulations - apparently that is not the case? Is there an option to ignore the filter of the slicer for purposes of the calculation for total views, but only display the full totals for the content the customer ID had viewed? Do I need to reapply the slicer filter to the result of the CALCULATE using ALLEXCEPT?
Thank you for any assistance!
@Greg_Deckler I'm having the exact same problem. I am using the following code to count attendance of campaign members across ALL historical campaigns, but I want to only show the attendance in a table visual for campaigns pertaining to a specific campaign I choose using a report page slicer:
Member Attendance =
var AttendanceCount = calculate(countrows('Campaign Member'), ALLEXCEPT(Campain, Campaign[Id]),'Campaign Member'[Status]="Attended")
return AttendanceCount
Campaign ID | Campaign Name |
A | Apple newsletter |
B | Orange newsletter |
Name | Campaign ID | Status |
Bob | A | No Show |
Suzy | A | No Show |
Amy | B | Attended |
Bob | B | Attended |
Campaign Member [Name] | Member Attendance (the measure from above) |
Bob | 1 |
Suzy | 0 |
Amy | 1 |
Campaign Member [Name] | Member Attendance (the measure from above) |
Bob | 1 |
Amy | 1 |
Gregg - I can try to replicate some of the item, but I can't post the actual data. There are no blank values in terms of Content ID with no customer views, all of the results returned have a count of 1 or more. I was surprised by the behavior, as I assumed that the CALCULATE using ALLEXCEPT against the filter column would affect only the calculation values, versus ignore the filter entirely.
@Triadelphia So, this can happen. Table and matrix visualizations automatically filter out rows where all of the numeric calculations return BLANK. So, probably something you can do to your measure to return BLANK instead of a number based upon some condition. However, next to impossible to say what that something is with the given information.
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
83 | |
70 | |
66 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |