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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AmalrajRRD1
Helper II
Helper II

Grouping values

Hi all,

 

I have sales data upto one  laks, I want to group the data like "<1000, 1000-5000", "5000-7000" and <7000.

 

How to do it in dax function?

somebody help me on this ?

 

thanks

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @AmalrajRRD1,

 

Add calculated column with below DAX formual.

Group =
IF (
    Table1[Sales] < 1000,
    "<=1000",
    IF (
        Table1[Sales] > 1000
            && Table1[Sales] <= 5000,
        "1000-5000",
        IF ( Table1[Sales] > 5000 && Table1[Sales] <= 7000, "5000-7000", ">7000" )
    )
)

Alternatively, you can right click the [sales] field and choose "new group".

2.PNG

 

Result.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @AmalrajRRD1,

 

Add calculated column with below DAX formual.

Group =
IF (
    Table1[Sales] < 1000,
    "<=1000",
    IF (
        Table1[Sales] > 1000
            && Table1[Sales] <= 5000,
        "1000-5000",
        IF ( Table1[Sales] > 5000 && Table1[Sales] <= 7000, "5000-7000", ">7000" )
    )
)

Alternatively, you can right click the [sales] field and choose "new group".

2.PNG

 

Result.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your Reply.

Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Need sample data but generally this involves a caculated column or a disconnected table trick measure.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.