Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi Everyone,
I am new to power bi and I am struggling with implementation of a card visual.
The data model structure:
I have all_orgs table that has information for all the orgs present. Let's say org_id and org_member(yes or no field). Let's say I have 5k+ records in this table.
I have another table participants which has 375 records only. it contains only [org_id]. Note that not all 375 orgs is present in the all_orgs table. Only 317 of them is present.
I have an active one to one relationship between all_orgs table and the partcipants table with filter direction set to both.
The objective:
I want to show a card visual which shows the count. ie out of 375 participants how many are present in all_orgs table. This I am able to achieve using the following DAX. There are 300 records present in all orgs table.
Hi All,
Firstly sergej_og thank you for your solution!
And @dparaman ,I tried to replicate your data for testing, when using is_member for testing, it is possible to filter according to the filter, it is possible that my data is too simple to replicate your specific problem, we also tried other DAX to realize your needs, you can try to see if it can accomplish your needs!
CountPresentOrgsFiltered =
CALCULATE(
COUNTROWS('participants'),
FILTER(
'participants',
NOT(
ISBLANK(
RELATED('all_orgs'[ORG_ID])
)
)
)
)
CountPresentOrgsFiltered2 =
CALCULATE(
COUNTROWS('participants'),
TREATAS(
VALUES(all_orgs[ORG_ID]),
'participants'[ORG_ID]
)
)
I hope my thoughts are helpful, and I would be honored if my approach solves your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hey @dparaman ,
can you pls provide a screenshot of your model...for better undestanding how fields are connected.
Pls mask sensitive data before sharing.
Thx.
Regards
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |