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 have two contents in a column, "Yes" and "No" and I want to create a line chart that shows the "Yes" as a percentage by month.
However, in my line chart, I can only get this as count data like this.
Someone, please help
Solved! Go to Solution.
Create a measure
percentage =
DIVIDE (
CALCULATE (
COUNT ( Sheet4[column] ),
FILTER ( ALLEXCEPT ( Sheet4, Sheet4[month] ), [column] = "yes" )
),
CALCULATE ( COUNT ( Sheet4[column] ), ALLEXCEPT ( Sheet4, Sheet4[month] ) )
)
Then add this measure to the "Value" field of the Line chart. (note the data format of the measure should be "percentage".)
Best Regards
Maggie
Create a measure
percentage =
DIVIDE (
CALCULATE (
COUNT ( Sheet4[column] ),
FILTER ( ALLEXCEPT ( Sheet4, Sheet4[month] ), [column] = "yes" )
),
CALCULATE ( COUNT ( Sheet4[column] ), ALLEXCEPT ( Sheet4, Sheet4[month] ) )
)
Then add this measure to the "Value" field of the Line chart. (note the data format of the measure should be "percentage".)
Best Regards
Maggie
Hi @v-juanli-msft,
Thank you for your replay.
I tried to adapt this solution to my need, it seems that I wanted to do the same. I have a column with 'Auto' and 'Manual' and I want to have a chart with a percentage of 'Auto' by month.
Unfortunately, my chart is flat, the same value every month. What is wrong?
My function:
AutoPOpercent = DIVIDE(CALCULATE(COUNT('PO Data'[Auto PO]); FILTER(ALLEXCEPT('PO Data';'PO Data'[Month]);'PO Data'[Auto PO] = "Auto")); CALCULATE(COUNT('PO Data'[Auto PO]);ALLEXCEPT('PO Data';'PO Data'[Month])) )
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |