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
AtchayaP
Helper V
Helper V

Powerbi

16558188158377193486351793158239.jpg

  I want to know dax syntax for calculating job range in PowerBI .  I have highlighted the column that is the answer should I need in PowerBI   @Vijay_A_Verma 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AtchayaP ,

 

It's the Power Query forum, we use the M language instead of the DAX language in the Power Query Editor.

They are different, you can refer to Differences between the M Language and DAX in Power BI.

The screenshot you provided is in the Power Query editor.

You can add the conditional column as

vstephenmsft_0-1656060022110.png

Here's the result.

vstephenmsft_1-1656060029450.png

You can go to the advanced editor to check you codes.

vstephenmsft_2-1656060079124.png

 

 

 

 

Best Regards,

Stephen Tao

 

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
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Use below DAX. Replace Range with your result column name and Years with your input column name

Range = 
SWITCH(TRUE(),
    [Years]>5,"5 years",
    [Years]>3,"3-5 years",
    [Years]>1,"1-3 years",
    "<1 year"
)

 

 Will this works,?

16558371403178707908006668186569.jpg

 

Anonymous
Not applicable

Hi @AtchayaP ,

 

It's the Power Query forum, we use the M language instead of the DAX language in the Power Query Editor.

They are different, you can refer to Differences between the M Language and DAX in Power BI.

The screenshot you provided is in the Power Query editor.

You can add the conditional column as

vstephenmsft_0-1656060022110.png

Here's the result.

vstephenmsft_1-1656060029450.png

You can go to the advanced editor to check you codes.

vstephenmsft_2-1656060079124.png

 

 

 

 

Best Regards,

Stephen Tao

 

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

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 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.

Top Solution Authors