Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have something really simple, yet can't solve for it easily.
I have a collumn, with two choice values "1" and "0".
The card displays the count of the "1", which for this example is 200.
Now I would like the card to show the percentage the "1" value is of the total, so there are 200 "1" and 800 "0", for it to display 20%.
Solved! Go to Solution.
Hi there,
This is just a basic measure.
Calculate(count(COLUMN); COLUMN = "1")
/
count(Column)
--> then just change type to %
Hi there,
This is just a basic measure.
Calculate(count(COLUMN); COLUMN = "1")
/
count(Column)
--> then just change type to %
Hey,
thanks, but something seems to go wrong:
Hi,
Thats becouse I live somewhere else 😉
Replace ";" by ","
If you would use more filters in the report or visual, use the solution below!!
Good Luck!
Thanks, thought of that, but something still seems to go wrong :
Ofcourse.. 🙂
You will have to adjust the tablename I used to the tablename you use.
If you plan on using PowerBI more, I can really sggest following link:
https://docs.microsoft.com/en-us/power-bi/guided-learning/
Haha no I did that, I'm just changing the name and collumn names when posting here.
Use COUNTROWS rather than COUNT
I had to remove the "" around 1 and it worked 🙂
really appreciate the help guys, I'm sure it's super straightforward for you haha.
The ; is suppose to be a ,
In the measure your using, use CALCULATE in conjunction with ALL or ALLSELECTED, depending on your needs
DIVIDE( CALCULATE( COUNTROWS( [Table Containing Data] ), [Column] = 1) ,
CALCULATE( [Your Measure], ALL( [Your Table] ) ),
0)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |