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
I am currently using a DAX function to indicate whether particluar row (unit of inventory) is Sold or Available. This is column that is added to the dataset in PowerBI (for each row) using an "if" statement.
I want to further the use the information in this column by doing the following in a a waffle chart (already downloaded).
1. How many units are "Available"
2. How many units are "Sold"
3. How many total units of Inventory (Available + Sold)
I am trying to arrive at the following as well.
5. % of units Available (Count of Available divided by Total Inventory)
6. % of units Sold (Count of Sold divided by Total Inventory)
Solved! Go to Solution.
Hi @Anonymous,
If you have got a column which has the actual values
EG: Column name: Status
Then what you can do is to create the following Measures
Total Inventory = CountRows('TableName')
Available = CALCULATE([Total Inventory],'TableName'[Status] = "Available")
Sold = CALCULATE([Total Inventory],'TableName'[Status] = "Sold")
% Units Available = DIVIDE([Available],[Total Inventory])
% Units Sold = DIVIDE([Sold],[Total Inventory])
Hi @Anonymous,
If you have got a column which has the actual values
EG: Column name: Status
Then what you can do is to create the following Measures
Total Inventory = CountRows('TableName')
Available = CALCULATE([Total Inventory],'TableName'[Status] = "Available")
Sold = CALCULATE([Total Inventory],'TableName'[Status] = "Sold")
% Units Available = DIVIDE([Available],[Total Inventory])
% Units Sold = DIVIDE([Sold],[Total Inventory])
Hi @Anonymous,
Would your please post same sample data, so we can analysis them directly? If your resource data is confidential, please create same sample data those structure likes your real data.
Best Regards,
Angelia
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 25 |
| User | Count |
|---|---|
| 124 | |
| 87 | |
| 70 | |
| 66 | |
| 65 |