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
Hello,
I am new to the forum and have some experience using power bi. Please refer to the image for
Question: How can I divide the yes column by the total for creating a new measure?
Example: for December 2022 there were 393 "yes" and 1308 "total" and I am trying to create a measure that divides the 393/1308 for a percentage of 30%.
I am trying to add an additional column for that percentage.
Thanks.
Solved! Go to Solution.
HI @DBPropest,
You can try to use the following measure formula if it suitable for your requirement:
formula =
DIVIDE (
CALCULATE (
COUNT ( Table[Image] ),
ALLSELECTED ( Table ),
VALUES ( Table[Month] ),
VALUES ( Table[Image] )
),
CALCULATE (
COUNT ( Table[Image] ),
ALLSELECTED ( Table ),
VALUES ( Table[Month] )
)
)
Regards,
Xiaoxin Sheng
HI @DBPropest,
You can try to use the following measure formula if it suitable for your requirement:
formula =
DIVIDE (
CALCULATE (
COUNT ( Table[Image] ),
ALLSELECTED ( Table ),
VALUES ( Table[Month] ),
VALUES ( Table[Image] )
),
CALCULATE (
COUNT ( Table[Image] ),
ALLSELECTED ( Table ),
VALUES ( Table[Month] )
)
)
Regards,
Xiaoxin Sheng
Sample Data:
| Image | Value | Month |
| Yes | 500 | January |
| No | 600 | February |
| Yes | 300 | March |
| No | 200 | April |
| Yes | 300 | May |
| Yes | 250 | April |
| No | 100 | January |
| Yes | 50 | February |
| No | 120 | March |
| No | 80 | May |
1. Select the Transform button on the top and go to the power query. There select, the month column, then select pivot option. It will change your data format.
2. Select Add column- custom column - give formula yes+no and enter ok. It will give total value.
3. Again select add column-custom column - give formula yes/new custom column. It will give desire value. Then, changed the data type to % and rename the column name.
Out Put:
Now, select the Matix visual, like below, you will get the desired out put.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |