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.
Hi,
I’m trying to create a percentage in PowerBI. I have the following 2 columns in my table:
Views | Targeted |
25000 | 0 |
25000 | 0 |
50000 | 1 |
I want to show on a card visual the % of Views that are targeted – so, expressing the fact that 50000 of the Views are marked with a 1 from the Targeted column = 50% of total views. Sorry, may be very simple, but how should I do this?
Many thanks
Chris
Solved! Go to Solution.
Hi @ChrisB1977
My idea would be to create a new column with this formula :
Result = IF(Table1[Targeted]=1;DIVIDE(Table1[Views ];SUM(Table1[Views ]));0)
Replace Table1 by your Table name
And in the modelisation section click on the % image to change your 0.5 into 50%
And If you numbers are text add " " for the 1
Not sure that's the best thing but it works for me
probably it's different locale try replacing ; with ,
Hi @ChrisB1977
My idea would be to create a new column with this formula :
Result = IF(Table1[Targeted]=1;DIVIDE(Table1[Views ];SUM(Table1[Views ]));0)
Replace Table1 by your Table name
And in the modelisation section click on the % image to change your 0.5 into 50%
And If you numbers are text add " " for the 1
Not sure that's the best thing but it works for me
Hi @quentin_vigne,
Thanks very much for replying so quickly. I tried the below but keep getting an error stating 'The Syntax for ';' is incorrect' - any ideas why it's doing this?
Many thanks for your help
Chris
probably it's different locale try replacing ; with ,
Thank you @quentin_vigne and @Stachu, a combination of your suggestions worked! Rerally appreciate your help
It works when I copy your datas on my PBI version
Did you change the table name / column name so that it match yours ?
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 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |