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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PrivateAnalytic
Helper IV
Helper IV

DAX Formula and Measure Question

Hello everyone! My data is depicted below (1st picture). It is pretty simple, I created the Total Subtasks Completed and the % of PP Progress columns. The total subtasks completed is the sum of the all the different subtask result columns, and the % of PP progress uses the values in the Total Subtasks completed columns divided by 17 because thats how many different subtasks there are. On the second picture I attached, I made a quick table visual which shows how many subtasks and their % of PP progress a person has. I was looking to create a measure or column which can bucket the % of PP Progress into a 25% bucket. Such as those between 0 and 25% are in 1, 26-50% in another, 51-75% in a third, and lastly 76-100%. Is there a DAX Calculation I can use to make this successful?

PrivateAnalytic_0-1668531540573.png

PrivateAnalytic_1-1668531723496.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Supposing your table named Data, try to add a column with the code below:
PctRange =
SWITCH(
    TRUE(),
    Data[% of PP Progress] <=0.25, "0-25%",
    Data[% of PP Progress] <=0.5, "26%-50%",
    Data[% of PP Progress] <=0.75, "51%-75%",
    "76%-100%"
)

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @PrivateAnalytic ,

 

Try a measure like below:

Measure =
var %Progress = sum([% of PP Progress])
Return
SWITCH(
    TRUE(),
    %Progress <= 0.25, 1,
    %Progress > 0.25 && %Progress < = 0.5, 2,
    %Progress > 0.5 && %Progress <=0.75, 3,
    4
)

 

FreemanZ
Super User
Super User

Supposing your table named Data, try to add a column with the code below:
PctRange =
SWITCH(
    TRUE(),
    Data[% of PP Progress] <=0.25, "0-25%",
    Data[% of PP Progress] <=0.5, "26%-50%",
    Data[% of PP Progress] <=0.75, "51%-75%",
    "76%-100%"
)

I got this error when I tried it <ccon>A circular dependency was detected: PP-Task Completion[% of PP Progress], PP-Task Completion[PctRange], PP-Task Completion[% of PP Progress].</ccon>

Rewrite your column as below:
% of PP Progress =
CALCULATE(
    DIVIDE(Data[Total Subtasks completed],17),
    ALLEXCEPT (Data[Total Subtasks completed])
)
Syk
Super User
Super User

You can group your data without DAX! Click the column you're wanting to group and under column tools > data groups > New data groups

Syk_0-1668532439368.png


Then you can toss those %s in buckets

I never knew this! When I tried to do it, I got this popup which I've never seen before. 

PrivateAnalytic_0-1668544621708.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.