The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
So I've got a table looking something like this that lists communications that have been sent and via what method
Customer ID | Message | Delivery Method | Sent Time |
1 | Welcome | AM | |
1 | Welcome | Letter | AM |
2 | Welcome | PM | |
3 | Congrats | Letter | AM |
3 | Congrats | PM | |
3 | Congrats | Letter | AM |
What I want is to put it into a table like this in a Power BI report
Customer ID | Message | Delivery Method | Count Sent | Count Sent any Delivery Method |
1 | Welcome | 1 | 2 | |
1 | Welcome | Letter | 1 | 2 |
2 | Welcome | 1 | 1 | |
3 | Congrats | Letter | 2 | 3 |
3 | Congrats | 1 | 3 |
Now the first 4 columns are easy, but what I need is a measure for the last column. I need it as a measure as I would like it to work with filters. For example if I filtered to just PM, then the value should update.
The difficulty I'm having is that it's easy to count all rows. I can even count all rows that match just the customer ID and Message, but what I can't do is count all rows that match everything (those two columns plus any applied filters) regardless of the delivery method column.
Any help would be appreciated, thanks.
Edit: can't get the table to display correectly. It looks correct when I edit the post and if I try and change the column width I get an error saying invalid html
Solved! Go to Solution.
You can create a measure like
Count sent any delivery method =
CALCULATE (
COUNTROWS ( 'Table' ),
ALLEXCEPT ( 'Table', 'Table'[Delivery method] )
)
You can create a measure like
Count sent any delivery method =
CALCULATE (
COUNTROWS ( 'Table' ),
ALLEXCEPT ( 'Table', 'Table'[Delivery method] )
)
User | Count |
---|---|
68 | |
63 | |
59 | |
55 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |