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! It's time to submit your entry. Live now!
In Excel, I had created the below column and formula which checked several columns and if they were a match would count that instance. I would like to set up a similar column in Power BI however it needs to be dynamic as the PowerBI will become a template and needs to be calculated on the fly with each new set of raw data.
I have created a new column and have been playing with SWITCH and COUNTX but haven't cracked it yet.
Any help greatly appreciated
Hi @Anonymous ,
Could you please post some simple sample data and your desired result to have a test if possible? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Regards,
Daniel He
Hi,
Drag columns, B,D,W,AA to the visual and then write this measure
=CALCULATE(COUNTROWS(Data),Data[Is the space occupied]="Empty")
Hope this helps.
Thanks so much for the quick reply. Sorry to say, I am not sure what you mean by "Drag columns, B,D,W,AA to the visual"
However, I do need the calculated number in each row of the column as becomes part of a stacked chart. Sorry - sounds complicated!
Hi,
You have to first load data from your Excel file into PowerBI desktop and then select the Table visual. Drag those columns to the visual and then write the measure i suggested.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 46 | |
| 30 | |
| 24 | |
| 23 |
| User | Count |
|---|---|
| 145 | |
| 111 | |
| 64 | |
| 38 | |
| 32 |