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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
barragan82
Helper II
Helper II

DAX Formula for 10 or 10% of a number

Hi everyone. I am hoping to create a measure that will automatically populate either the number 10 if a number is less than or equal to109, or automatically populate 10% of a number if the number is greater than or equal to 110. 

 

In the sample below, this measure would be applied according to the number in the Assignments column. Course A has 110 assignments, so the measure would automatically populate the number 11 because the number of assignments is greater than or equal to 110, and 11 is 10% of 110. Course B has 86 assignments, so the measure would automatically populate the number 10 because 86 is less than or equal to 109. Course C would be populated with 23 because 236 is greater than 110, and 23 is 10% of 236, and Course D with 10 because 26 is less than 109. I would greatly appreaciate any help. Thank you!

 

barragan82_0-1753751023529.png

 

3 ACCEPTED SOLUTIONS
Aburar_123
Solution Supplier
Solution Supplier

Hi @barragan82 ,

You can write a measure like below,

 

Measure = if(MAX('Table'[Assignments])<=109,10,FORMAT((MAX('Table'[Assignments])*.10)/100,"##%"))
Aburar_123_0-1753753845514.png

 

if you dont want the %symbol, just correct the measure as below,

Measure = if(MAX('Table'[Assignments])<=109,10,MAX('Table'[Assignments])*.10)

View solution in original post

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1753756492455.png

 

 

expected result measure: =
VAR _assignment =
    SELECTEDVALUE ( data[assignments] )
RETURN
    IF (
        HASONEVALUE ( data[course] ),
        SWITCH (
            TRUE (),
            _assignment < 110, 10,
            _assignment >= 110, ROUNDDOWN ( _assignment * 0.1, 0 )
        )
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

This works exactly as I need it to. Thank you!!

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1753756492455.png

 

 

expected result measure: =
VAR _assignment =
    SELECTEDVALUE ( data[assignments] )
RETURN
    IF (
        HASONEVALUE ( data[course] ),
        SWITCH (
            TRUE (),
            _assignment < 110, 10,
            _assignment >= 110, ROUNDDOWN ( _assignment * 0.1, 0 )
        )
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

This works great, thank you!

Aburar_123
Solution Supplier
Solution Supplier

Hi @barragan82 ,

You can write a measure like below,

 

Measure = if(MAX('Table'[Assignments])<=109,10,FORMAT((MAX('Table'[Assignments])*.10)/100,"##%"))
Aburar_123_0-1753753845514.png

 

if you dont want the %symbol, just correct the measure as below,

Measure = if(MAX('Table'[Assignments])<=109,10,MAX('Table'[Assignments])*.10)

This works exactly as I need it to. Thank you!!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.