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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
musicbydannyd
Advocate IV
Advocate IV

Best Method for Grouping?

I am curious of your thoughts/opinions of the best method to go about this...

 

I am creating a financial statement summary from a SQL database of General Ledger transactions and need various combinations of companies (9), departments (80+) and account numbers (30,000+) assigned to a seperate line of the statment. What I'd like to do is create a lookup table with these various combinations (so I only have to do this once!) and obviously this can involve a great deal of detail. For example:

if Co-Dept-Acct# >=1222230000 and Co-Dept-Acct# <=1222239999 
or Co-Dept-Acct# >=1444430000 and Co-Dept-Acct# <=1444439999

or Co-Dept-Acct# =1555532100

(etc. through multiple Co-DeptAcct combinations)

then "Revenue Bucket 1"

(repeat for each revenue, asset, expense, etc. group)

 

These are the 3 methods I'm considering, but would love to hear of any other (simpler) options:

  1. A custom column with multiple/nested if-then-else, AND & OR statements.
  2. Creating a view on the SQL server using a 'CASE' statement.
  3. The 'Group By' function in the query editor (which I've used before, but have little experience).

Thanks in advance!

2 REPLIES 2
Anonymous
Not applicable

@musicbydannyd This sounds like a good use case for dynamic segmentation. This concept and implementation is fully described by Marco Russo and Alberto Ferrari on their daxpatterns website here

If that doesn't directly apply, there are several other methods that you can use to build classifications. I would recommend the full list here under "Classification"

@Anonymous, thanks for the links! I've stolen used some of Marco Russo's methodology before and will definitely look into this. 🙂

 

Thanks again, DannyD

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.