Forum Discussion
Attempting to create a histogram (distribution) bar chart based on a measure
- 2 years ago
hello afaherty
please check if this accomodate your need.
first, i assumed the percent only limited to 'Test' only. also i added another student ID because i assumed you will have plenty of different student id.
1. create a measure as your measure above.
Sum of Point = DIVIDE(SUM('Table'[Points]),SUM('Table'[Max]))
2. create a calculated column with following DAX as you need for your x-axis value.Percent =
CALCULATE(
[Sum of Point],
FILTER(
'Table',
'Table'[Test]=EARLIER('Table'[Test])&&
'Table'[Student ID]=EARLIER('Table'[Student ID])
)
)3. plot the column and student ID in bar chart (dont forget to change Y-axis into count distinct)
4. to make similar to your example graphic, then change minimum and maximum value so it will show 0%-100% and invert range to make 100% on the left.
Hope this will help.
Thank you.
hello afaherty
please check if this accomodate your need.
first, i assumed the percent only limited to 'Test' only. also i added another student ID because i assumed you will have plenty of different student id.
1. create a measure as your measure above.
Sum of Point = DIVIDE(SUM('Table'[Points]),SUM('Table'[Max]))
Percent =
CALCULATE(
[Sum of Point],
FILTER(
'Table',
'Table'[Test]=EARLIER('Table'[Test])&&
'Table'[Student ID]=EARLIER('Table'[Student ID])
)
)
3. plot the column and student ID in bar chart (dont forget to change Y-axis into count distinct)
4. to make similar to your example graphic, then change minimum and maximum value so it will show 0%-100% and invert range to make 100% on the left.
Hope this will help.
Thank you.
Beautiful! Thank you so much, I really appreciate it!!