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.
Hey there.
I have a table visualizing the number of different channels held by an employee. I have to count how many times each combination and number of channels appears.
Thus, instead of full names, I have to somehow summarize this data and get the number of full names for each combination (see the second screenshot).
Also, these counters are measures that take into the account start and end dates of the employees, so that the data can be filtered dynamically by date. That's why a calculated column won't probably be a solution.
Here's how my data looks like:
resource_allocation table:
allocation_code (PK) | FullName | start_date | end_date | Emails | Calls | Social |
1 | employee1 | 03/03/2020 | 08/11/2020 | 1 | 1 | 1 |
2 | employee2 | 01/01/2019 | 2 | |||
... | ... | ... | ... |
sdr_channels table:
channel_code (PK) | allocation_code (FK) | sdr_channel |
1 | 1 | Emails |
2 | 1 | Calls |
3 | 1 | Social |
4 | 2 | Calls |
... | ... | ... |
Note: 'Emails', 'Calls' and 'Social' in the resource_allocation table are calculated columns. I use the following formula:
The measures-counters for the table visual are:
Tables' relationships:
The result I want to achieve:
Hi @Anonymous ,
Try this measure:
Measure =
CALCULATE (
COUNT ( 'Table'[Full Name] ),
FILTER (
ALL ( 'Table' ),
COUNTROWS (
FILTER (
'Table',
'Table'[Calls Counter] = EARLIER ( 'Table'[Calls Counter] )
&& EARLIER ( 'Table'[Email Counter] ) = 'Table'[Email Counter]
&& 'Table'[Social Counter] = EARLIER ( 'Table'[Social Counter] )
)
)
)
)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your answer @V-lianl-msft .
However, I think I can't use EARLIER with a measure (while my counters are measures). The part
EARLIER ( 'Table'[Calls Counter] )
is underlined red and it says "Parameter is not the correct type".
Also, I can't edit this post properly for some reason, so I'll provide the additional info here...
Here's how my data looks like:
resource_allocation table:
allocation_code (PK) | FullName | start_date | end_date | Emails | Calls | Social |
1 | employee1 | 03/03/2020 | 08/11/2020 | 1 | 1 | 1 |
2 | employee2 | 01/01/2019 | 2 | |||
... | ... | ... | ... |
sdr_channels table:
channel_code (PK) | allocation_code (FK) | sdr_channel |
1 | 1 | Emails |
2 | 1 | Calls |
3 | 1 | Social |
4 | 2 | Calls |
... | ... | ... |
Emails, Calls and Social in resource_allocation table are calculated columns, which look like this:
@Anonymous your problem is not very clear. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
111 | |
97 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |