Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'm very new to DAX in general and come from a C# background (Nothing Alike
)
I have a table with the following Columns:
ID - Int
DateTimeCreated - DateTime
EventSource - Varchar
EventType - Varchar
Description - Varchar
ClosingTime - Time
Status - Varchar
The data would typically look as follows:
I would like to have a count for how many times an EventSource is Locked/Unlocked. Example in data provided Box 20 Lock has a Locked count of 3
Your help is appreciated.
Thank you
Solved! Go to Solution.
Hi @Anonymous,
Please try the following formula to create calculated columns.
Lock=CALCULATE(COUNTA(Table[status]),FILTER(ALLEXCEPT(Table,Table[EventSource]),Table[status]="locked")) Unlock=CALCULATE(COUNTA(Table[status]),FILTER(ALLEXCEPT(Table,Table[EventSource]),Table[status]="unlocked"))
If you have other issues, don't hesitate to let me know.
Best Regards,
Angelia
Hi @Anonymous,
Please try the following formula to create calculated columns.
Lock=CALCULATE(COUNTA(Table[status]),FILTER(ALLEXCEPT(Table,Table[EventSource]),Table[status]="locked")) Unlock=CALCULATE(COUNTA(Table[status]),FILTER(ALLEXCEPT(Table,Table[EventSource]),Table[status]="unlocked"))
If you have other issues, don't hesitate to let me know.
Best Regards,
Angelia
Thanks a lot!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 172 | |
| 107 | |
| 92 | |
| 54 | |
| 46 |