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 know the name sounds convoluded, but it's a simple enough problem, I'm just having trouble getting it to work.
Say that table CLIENTS contains a record of clients, and table CALLS contains phone calls made to clients. They are linked by the 1-* (CLIENTS-CALLS) field, CLIENTID.
Now, I want to display a pie graph of the number of clients that have and have not been called in a given time period. This time period is defined by a slicer pertaining to the DATE field of the CALLS table.
So far I've got all of this last bit to work correctly. The pie chart is not responding to the slicer.
So far, I've been trying to use the results from a new column in CLIENTS:
CalledInPeriod = IF(CALCULATE(COUNT(CALLS[CALLID])
, FILTER(CALLS, AND(
AND(MIN(CALLS[DATE]) <= CALLS[DATE]
, CALLS[DATE] <= MAX(CALLS[DATE])
)
, CALLS[CLIENTID] = 'CLIENTS'[CLIENTID]
)
)
) > 0
, 1
, 0)
CALLID is a distinct identifier for each call.
Thanks for any help!
Solved! Go to Solution.
I think I got it to do what I want it to do. Had to create 3 Measures, then display the latter two in a pie chart. Was trying to do it with smart columns before.
Calls Per Site = COUNT(CALLS[CALLID])
Sites Called = CALCULATE(COUNT('CLIENTS'[CIENTID]), FILTER('CLIENTS', [Calls Per Site] >= 1))
Sites Not Called = CALCULATE(COUNT('CLIENTS'[CLIENTID]), FILTER('CLIENTS' [Calls Per Site] < 1))
I think I got it to do what I want it to do. Had to create 3 Measures, then display the latter two in a pie chart. Was trying to do it with smart columns before.
Calls Per Site = COUNT(CALLS[CALLID])
Sites Called = CALCULATE(COUNT('CLIENTS'[CIENTID]), FILTER('CLIENTS', [Calls Per Site] >= 1))
Sites Not Called = CALCULATE(COUNT('CLIENTS'[CLIENTID]), FILTER('CLIENTS' [Calls Per Site] < 1))
I know, what if I'm approaching this the wrong way? Maybe the solution is to list the distinct CALLS[CLIENTID]s, count them, and then somehow count the remaining CLIENTIDs in the CLIENTS table. But how?
I assumed you already have relatonship set between both the tables, please confirm?
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.
Yes, both tables had a CLIENTID field, which is the unique identifier in the CLIENTS table.
CLIENTS[CLIENTID] 1 to many CALLS[CLIENTID]
Did you set up the relationship in powerbi between those two tables?
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.
You bet.
Hi @jengwt,
Have you resolved your issue? Please feel free to ask if you have, otherwise, please mark the right reply as answer, so more people will benefit from here.
Thanks,
Angelia
No, I have not. The issue is not so basic as a simple relationship between two tables. I will not mark an answer.
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 |
---|---|
118 | |
107 | |
70 | |
70 | |
43 |
User | Count |
---|---|
148 | |
104 | |
104 | |
89 | |
66 |