Forum Discussion
Group Data Between a Date Range
You can use the following DAX to get a new table group by Review Type. Then you can use it to get the similar information as you expected. I did not find a way that could merge Not Reviewed information in to Review Type table. Maybe someone else could help.
ReviewSummary = GROUPBY(Review,Review[Review Type],"SalesSum",SUMX(CURRENTGROUP(),IF(Review[Review End Date]>=Review[Sales],Review[Sales Year],0)))
Thank you for the formula. I was able to replicate it for my data. I think I wasn't very clear on needing the Group Type as well, I didn't put it in my example solution like I should have.
I would like to also include the Group Type. In a perfect world the solution would look like the following:
| For 2014-2017 | |||||
| Group Type | Total Sales | Review Type A | Review Type B | Review Type C | Not Reviewed |
| 1 | 5000 | 5000 | 0 | 0 | 0 |
| 2 | 6000 | 0 | 0 | 0 | 6000 |
| 3 | 7000 | 0 | 0 | 7000 | 0 |
| 4 | 8000 | 8000 | 0 | 0 | 0 |
| 5 | 9000 | 9000 | 0 | 0 | 0 |
I can also just caculate the Not Reviewed column by doing a subtraction of Total Sales - All Review Types but I wasn't sure how to get table created in this format for a larger data set.
Thanks!