Forum Discussion
grouping ranges
- Anonymous2 years ago
Hi jcastr02 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create calculated columns.
Rank = RANKX(FILTER('Table','Table'[store]=EARLIER('Table'[store])),'Table'[Call Volume],,ASC,Dense)Monthly Call Volume = var _a=CALCULATE(MIN('Table'[Call Volume]),FILTER('Table','Table'[store]=EARLIER('Table'[store]) && 'Table'[Rank]=1)) var _b=IF('Table'[Rank]=1,0 & "-" & _a) var _c=CALCULATE(MIN('Table'[Call Volume]),FILTER('Table','Table'[store]=EARLIER('Table'[store]) && 'Table'[Rank]=EARLIER('Table'[Rank]))) var _d=CALCULATE(MIN('Table'[Call Volume]),FILTER('Table','Table'[store]=EARLIER('Table'[store]) && 'Table'[Rank]=EARLIER('Table'[Rank])+1)) RETURN SWITCH(TRUE(), 'Table'[Rank]=1,0 & "-" & _a & " /Month", 'Table'[Rank] <> 1,_c & "-" & _d & " /Month")(3) We can create a measure.
% of Total = var _a=CALCULATE(SUM('Table'[Call Volume]),FILTER(ALLSELECTED('Table'),'Table'[store]=MAX('Table'[store]))) var _b=CALCULATE(SUM('Table'[Call Volume]),FILTER(ALLSELECTED('Table'),'Table'[Rank]=MAX('Table'[Rank]) &&'Table'[store]=MAX('Table'[store]))) RETURN DIVIDE(_b,_a,0)(4) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
Hi,
The grouping ranges will have to be created manually. You may refer to my solution to a similar problem in the attached PBI file.
Hi,
The grouping ranges will have to be created manually. You may refer to my solution to a similar problem in the attached PBI file.