Forum Discussion
Grouping in ribbon chart
Hi t0meky ,
You could change the SUM( sales) to MAX (name) and change the country name to 1,2,3. Please reference the formula below to modify yours.
Measure =
VAR ab =
CALCULATE (
MAX( 'Table'[ Name] ),
FILTER ( 'Table', 'Table'[Country] = "1" || 'Table'[Country] = "2" )
)
VAR abc =
CALCULATE (
MAX( 'Table'[ Name] ),
FILTER (
'Table',
'Table'[Country] = "1"
|| 'Table'[Country] = "2"
|| 'Table'[Country] = "3"
)
)
RETURN
IF ( MAX ( 'Table 1'[Column1] ) = "1 & 2", ab, abc )
If it still doesn't work, please share some sample data and your expected result. Then we will understand clearly.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-xuding-msft ,
query with MAX (or MIN) value is giving me back the result, but it is not sufficient.
For this query I am only getting the highest or the lowest value (not in line with a command, so the lowest for MAX and the highest for MIN, but it is not a case) for each week group, so indeed it is working, because it shows me the company with the lowest value for week 1,2 and 1,2,3; but I need this information for all companies, to have it cumulative (in a table or in a graph, preferable the graph which is presented in my initial post).
The data sample:
| COMP | WEEK |
| AAA | 1 |
| BBB | 1 |
| CCC | 1 |
| DDD | 1 |
| EEE | 1 |
| AAA | 1 |
| AAA | 1 |
| DDD | 1 |
| EEE | 1 |
| DDD | 1 |
| DDD | 2 |
| AAA | 2 |
| CCC | 2 |
| AAA | 2 |
| BBB | 2 |
| BBB | 2 |
| BBB | 2 |
| BBB | 2 |
| BBB | 2 |
| AAA | 2 |
| DDD | 3 |
| AAA | 3 |
| BBB | 3 |
| EEE | 3 |
| CCC | 3 |
So the result are: groupped weeks values (1,2 and 1,2,3) and cumulative value of companies in one group.
P.S. for the MAX measure - I cannot put this measure in a value field for the graph as it is constructed from strings I guess.
Thank You in advance!
Regards,
Tomasz
- v-xuding-msft6 years ago
Community Support
Hi t0meky ,
Can you please share a dummy pbix file or some sample data and your expected results?
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.