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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SIBI1998
Helper I
Helper I

If condition Using Then

Hi Team,

 

          If Sum(Act Ucc Cnt) >= 5 then I need an Output as Greater than 5 , 

 

          If Sum(Act Ucc Cnt) < 5 and Sum(Act Ucc Cnt) >=1 then I need an Output as Less than 5 .

 

How do I got the Solution.

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @SIBI1998 ,

 

Try this:-

Measure = 
Switch(true(),
Sum(Act Ucc Cnt) >= 5,"Greater than 5", 
Sum(Act Ucc Cnt) < 5 && Sum(Act Ucc Cnt) >=1,"Less than 5"
)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
apatwal
Helper III
Helper III

Hi @SIBI1998 

 

You can try the below DAX to create a measure:

Result = 
    SWITCH(
        TRUE(),
        SUM('Table'[Act Ucc Cnt]) >= 5,"Greater than 5", 
        SUM('Table'[Act Ucc Cnt]) < 5 && SUM('Table'[Act Ucc Cnt]) >=1,"Less than 5"
    )

 

Thanks..

goncalogeraldes
Super User
Super User

Hello there @SIBI1998 ! Try the following:

Measure_Name =
VAR _act_ucc_cnt =
    SUM ( 'Table_name'[Act Ucc Cnt] )
RETURN
    SWITCH (
        TRUE (),
        _act_ucc_cnt >= 5, "Greater than 5",
        _act_ucc_cnt < 5
            && _act_ucc_cnt >= 1, "Less than 5"
    )

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Samarth_18
Community Champion
Community Champion

Hi @SIBI1998 ,

 

Try this:-

Measure = 
Switch(true(),
Sum(Act Ucc Cnt) >= 5,"Greater than 5", 
Sum(Act Ucc Cnt) < 5 && Sum(Act Ucc Cnt) >=1,"Less than 5"
)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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