Hi,
I am trying to 1) calculate the percentages of attendance (binary column 1 =attended 0 =not attended) for 10 different modules. The format of the columns is below:
Module 1 | Module 2 | Module 3 | Module 4 etc. |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 1 |
0 | 1 | 0 | 0 |
Once I have the percentages of attendance for each of the 10 modules, I would then like to display that in a bar graph showing each of the 10 modules on the x axis and then the percentages on the y.
I created the following measure for one of the modules but am having issues when creating the bar chart.
is the table your sample data?
What's the expected output?
module 1 66.6%
module 2 33.3%
module 3 66.6%
Proud to be a Super User!
yes the sample data is the table above and expected output is ultimately a bar chart with the modules on the x x axis and the percentages for each on the y axis
you can try this
in PQ
1, use header as first row
2. transpose
3. select first column and unpivot other columns
then you can create measure (make sure the data type of value column is whole number)
Measure = sum('Table'[Value])/COUNTROWS('Table')
pls see the attachment below
Proud to be a Super User!