Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
JBal86
Frequent Visitor

Custom Grouping on visual gone wrong (inverted), please help

Hello, 

 

For my Users, I have created a report that compare two different group of Country (selected in slicers).

 

As you can see below, user needs to select in slicer A and B, Countries as they want ( no prefiltering), slicers cointains same list of countries, from separate dedicated DT. I've tried to group them in one table report to ease the "at first glance" analysis. 

 

MY PROBLEM : the countries are going to the wrong group, they're inverted. How can I make it work ?

 

Thank you in advance for your help.

 

Rest of the report works correctly, new incremental change is about the Grouping for Table view.

 

JB

 

PS: details below

 

view of the report:

JBal86_0-1735071290579.png

Table's elements:

JBal86_1-1735071343696.png

 

For grouping my countries I've done: (problem the countries are going to the wrong group)

_Comparison_Measures_Countries =
DATATABLE(
    "Group", STRING,
    {
        {"A"},
        {"B"}
    }
)

JBal86_2-1735071514215.png

 

Details for slicers A

Selected_Country_A = VALUES(_CountrySelectionA[country])
List of Countries in Custom TABLE 
JBal86_3-1735071912087.png

 

Details for slicers B

Selected_Country_B = VALUES(_CountrySelectionB[country])

List of Countries in Custom TABLE 

JBal86_0-1735075004118.png

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @JBal86 ,

 

I think there should be a fact data table in your data model. I suggest you to add [Group] column in this table and the create data hierarchy in matrix.

Get the first word from [Country] column by LEFT() function.

Group =
LEFT ( 'TableName'[Country], 1 )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @Anonymous,

 

Thank you for your answer.

I'm not sure I quite understand your solution. Can you extrapolate some more please. 

Also, I think I need to add some extra U(x) details on the report because I'm not sure if your fix would work correctly.

 

Slicer A and B have the same list of countries comming form main DT holding the data:

_CountrySelectionA = DISTINCT('Sales company')
_CountrySelectionB = DISTINCT('Sales company')
 
For both I have a measure to get the selected ones, that I propagate futher with calculation.
Selected_Country_A = VALUES(_CountrySelectionA[country])
Selected_Country_B = VALUES(_CountrySelectionB[country])
 

It means that the selection can be more random than mine. In my example above, I used an unfortunate combination to ease me the dev work. (Countries begin with the same letter). The user can use more advance grouping, for example:

JBal86_1-1735202255179.pngJBal86_4-1735202652895.png

I'm trying to find a way to group seperatly each selection made in slicer A and B.

 

The Goal is to add an additional layer to this report, to group the selection and compare each grouping results.

 

image.png

Thank you once again for your answer 🙂

 

JB

 

 

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.