Forum Discussion
Percentage DAX Formula
Hi,
I want to create a percentage figure, i.e. x%, from two text fields.
It's basically calculating click through rate as a %. I've got a count of my audience for a mailshot in a column, a count of clicks in another column but I need to compute click through % line by line. Help!?
Regards,
S
25 Replies
- ovetteabejuelaImpactful Individual
Sample data would help, not sure what you're trying to do but have you tried DIVIDE and format the resulting column to a Percentage?
New Column Name = Divide(Column A,Column B)And then format New Column Name to percentage.
- SachinCHelper V
Hi thanks for that. However, my values for Column A and Column B is text. I am counting Column A and ColumnB but I want to do an inline percentage. See example below. 33 and 31 are counts of Text fields, I want to
- SachinCHelper V
Hi thanks for that. However, my values for Column A and Column B is text. I am counting Column A and ColumnB but I want to do an inline percentage. See example below. 33 and 31 are counts of Text fields, I want to put an inline column to divide 31/33= 93.93%
Thanks.
- ovetteabejuelaImpactful Individual
Would you be able to post a dummy data keeping the table structure? and also if possible the result desired.
- nishamartisFrequent Visitor
Hi,
I tried to use Divide with Calculated column and got Blank value. Not sure why.
- ovetteabejuelaImpactful Individual
Not sure if it's late in the game but when you're trying the suggestions are you doing it on a separate pbix environment and not in your main data model?
I asked because usually when we ask for help we only take a portion of the data model and present to the community. when they do the solution it woluld work but when we apply it to the main data model it would...
Then there might be something from the data model that is causing this...
- SerenatMacarNew MemberHi! Try to create a measure like this and use FORMAT to get the percentage value.
BluePercentage =var __bluePerc = DIVIDE([BlueNumber], [BlueNumber]+[GreenNumber])return "The"&FORMAT(__bluePerc, "Percent") &" of the values are blue."