Forum Discussion
Year over year comparison
- 7 years ago
Hi clairethnguyen,
For your desired output, it seems that you want to get the output like this.
If you want to get the output above, please follow the steps below.
1. Unpivot Has curriculum map and use of results columns in Query Editor.
2. Create the measures below.
yes = CALCULATE(COUNTROWS('Table2'),FILTER('Table2','Table2'[Value]="yes")) totalrows for each year = CALCULATE(COUNT(Table2[Program name]),ALLEXCEPT(Table2,Table2[Year])) percent = [yes]/ [totalrows for each year]3. Create the bar chart.
More details, you could refer to the attachment.
Best Regards,
Cherry
Hi clairethnguyen,
I'm not clear about your output.
Do you want to have the output like below highlight in red?
If it is, you could create the measures below.
count_product_each_year = CALCULATE(COUNTROWS('Table1'),ALLEXCEPT(Table1,Table1[Year]))
yes = CALCULATE(COUNT(Table1[Has curriculum map]),FILTER(ALLEXCEPT(Table1,Table1[Year]),'Table1'[Has curriculum map]="yes"))
Percent= [yes]/[count_product_each_year]
If you still need help, please share your desired output.
Best Regards,
Cherry
Hi Cherry v-piga-msft
Thank you so much for your answer. Yes, it is what I want but I also want to put other categories into the same chart (in this case both column 3 and column 4 data for each year: in 2014: x % of the programs has a curriculum map, y% of the program use the results). Is it possible? What should I do if it is?
Thanks,
Claire
- v-piga-msft7 years ago
Resident Rockstar
Hi clairethnguyen,
Do you want to get the output like this?
If it is, please create another two measures like below.
Has curriculum map_yes = CALCULATE ( COUNT ( Table1[Has curriculum map] ), FILTER ( ALLEXCEPT ( Table1, Table1[Year] ), 'Table1'[Has curriculum map] = "yes" ) ) Has curriculum map_Percent = [Has curriculum map_yes]/[count_product_each_year]Then create the bar chart like blow.
Best Regards,
Cherry
- clairethnguyen7 years agoFrequent Visitor
Hi Cherry v-piga-msft
I actually want to see how the values change over the year. It's similar to this report:
Is there a way to do this?
Thank you very much.
C
- v-piga-msft7 years ago
Resident Rockstar
Hi clairethnguyen,
For your desired output, it seems that you want to get the output like this.
If you want to get the output above, please follow the steps below.
1. Unpivot Has curriculum map and use of results columns in Query Editor.
2. Create the measures below.
yes = CALCULATE(COUNTROWS('Table2'),FILTER('Table2','Table2'[Value]="yes")) totalrows for each year = CALCULATE(COUNT(Table2[Program name]),ALLEXCEPT(Table2,Table2[Year])) percent = [yes]/ [totalrows for each year]3. Create the bar chart.
More details, you could refer to the attachment.
Best Regards,
Cherry