Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Solved! Go to Solution.
Hello,
I don't really understand what do you mean with "when the parent id equals the guardian id", do you mean for every specific day?
Take a look on this pbix
Hello,Gabry ,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@Anonymous .I am glad to help you.
Thanks to Gabry's help, calculate column [P-S ] works very well to achieve the following effect:
Find the corresponding Parent in the Parent table based on the date, and then determine if this 'Parent' is equal to the 'Guardian' in the 'Guardian' table, thus determining the type of 'Guardian'
I have added an extra twist to this for your needs.
For each row, calculate the number of [P-S]=“Primary” and the number of [P-S]=“Secondary”.
like this:
I used the filter function to redefine the calculation environment in the calculate function, and used the ALL function to remove the external filters in the table 'Guardian' and calculate only the corresponding quantities.
count_Primary =
CALCULATE (
COUNT ( 'Guardian'[P - S] ),
FILTER ( ALL ( Guardian ), 'Guardian'[P - S] = "Primary" )
)
count_Secondary =
CALCULATE (
COUNT ( 'Guardian'[P - S] ),
FILTER ( ALL ( Guardian ), 'Guardian'[P - S] = "Secondary" )
)
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian
Hello,Gabry ,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@Anonymous .I am glad to help you.
Thanks to Gabry's help, calculate column [P-S ] works very well to achieve the following effect:
Find the corresponding Parent in the Parent table based on the date, and then determine if this 'Parent' is equal to the 'Guardian' in the 'Guardian' table, thus determining the type of 'Guardian'
I have added an extra twist to this for your needs.
For each row, calculate the number of [P-S]=“Primary” and the number of [P-S]=“Secondary”.
like this:
I used the filter function to redefine the calculation environment in the calculate function, and used the ALL function to remove the external filters in the table 'Guardian' and calculate only the corresponding quantities.
count_Primary =
CALCULATE (
COUNT ( 'Guardian'[P - S] ),
FILTER ( ALL ( Guardian ), 'Guardian'[P - S] = "Primary" )
)
count_Secondary =
CALCULATE (
COUNT ( 'Guardian'[P - S] ),
FILTER ( ALL ( Guardian ), 'Guardian'[P - S] = "Secondary" )
)
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian
Hi, to elaborate, i'm looking for every occurance where each cell of the parent id is shown in the column guardian id. I would like to label the cell next to the parent id as 'primary'. I then want to count all the cell with the term Primary. This is needed for every row in the parent id column
Yes I do
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
29 | |
28 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |