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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
sanct
Frequent Visitor

Grouping Selected Rows and Calculating Value in One of those Rows

Hi All,

 

I have a bit of a bizarre data model that I'm trying to work with.  Here's a snapshot of it:

 

group.png

 

Background

 

My org conducts a survey across multiple categories for our members. As exported from the survey, the results are very difficult to analyze, containing 640 columns with related information split across multiple columns. For example (drawing on the chart above), an organanization may have multiple departments that we're analyzing, and so there is a column for "Department 1 - Department Size", "Department 1 - Department Name", "Department 1 - Sales" and they repeat for as many as 15 departments.

 

In the example above I include only the topic "Food", but assume I also have 8 other topics that come from this data export.

 

My First Solution

 

My first solution was to conduct a number of transformations (including an unpivot columns) on the data in order to break everything into less than 10 columns.

 

The ones I want to focus on are:

 

1. [Section]: an integer value for the section

2. [Topic]: a string describing the section

3. [Dimension]: a first-level break down/grouping of overlapping columns (i.e. a way of grouping departments from the example above)

4. [Sub-Dimension]: a second-level break down of overlapping columns (i.e. a way of identifying the specific departments, so in the example above, this is where I would specify that this is "department 1", or "department 2" etc)

5. [Sub-Sub-Dimension]: the final break down level where I can specify the common discrete variables that I'm measuring (i.e. "Department Name", "Department Size", "Sales")

6. [Value]: string value of the results from the original columns in the survey export

7. [Num Value]: a custom column that fetches number values from [Values] and returns them in a column where I can run sums and other measures.

 

This works fairly well. I can use DAX to create calculated tables of dimensions that filter the central table--overall a nice and clean snowflake schema, as below:schema.png

I use DAX to create measures that calculate based on the selected dimension table. It all actually works really well until I get to the category I'm discussing here.

 

The Problem

 

So I'm not sure how to calculate the total sales, filtered by the department size categories (i.e. "0-9","10-500","500+"). I have a suspicion that I can use the sub-dimension (i.e. "1","2","3", etc) to group rows, but I'm not sure how to go about doing this. I'm not actually sure this is possible.

 

Any help would be appreciated.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sanct ,

Maybe you can consider add calculated column with custom numeric range and mark as category and add a bridge table with these category to link tables.
After these, you can then use this category column to create a slicer to filter multiple tables.
.

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @sanct ,

Maybe you can consider add calculated column with custom numeric range and mark as category and add a bridge table with these category to link tables.
After these, you can then use this category column to create a slicer to filter multiple tables.
.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.