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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sophie0320
Frequent Visitor

Report view missing data issue after sorting rows by a custom order

I have a report view like below. The expression of measure Q1_ is on the top, coming from the column Q1_pre.

Sophie0320_0-1678730428973.png

 

By following Solved: How to sort my rows and columns by cutom order - Microsoft Power BI Community,

I created a dimension table to sort the rows. 

Sophie0320_1-1678730541109.png

After replacing the column Count Type in the report with Count Type (DIM), the rows are sorted. But two numbers are missing.

Sophie0320_2-1678730829400.png

Anybody know the reason? How can I fix it?

Thanks a lot!

1 REPLY 1
Sophie0320
Frequent Visitor

I have not figured our a solution. Let me explain more.

Here is the expression of the measure Q1_:

Q1_ =
var _A =
SWITCH (SELECTEDVALUE('Staffing Summary (2)'[Count Type]),
"% Completed", DIVIDE(CALCULATE(SUM('Staffing Summary (2)'[Q1_pre]), 'Staffing Summary (2)'[Count Type] = "Staffing Achieved"),
CALCULATE(SUM('Staffing Summary (2)'[Q1_pre]), 'Staffing Summary (2)'[Count Type] = "Planned Staffing"), 0),
"% Name Identified", DIVIDE(CALCULATE(SUM('Staffing Summary (2)'[Q1_pre]), 'Staffing Summary (2)'[Count Type] = "Names Identified"),
CALCULATE(SUM('Staffing Summary (2)'[Q1_pre]), 'Staffing Summary (2)'[Count Type] = "Planned Staffing"), 0),
SUMX('Staffing Summary (2)',[Q1_pre])
)
RETURN
switch (SELECTEDVALUE('Staffing Summary (2)'[Count Type]), "% Completed", FORMAT(_A,"#%"), "% Name Identified", FORMAT(_A,"#%"),FORMAT(_A, "#,0"))

I need to recalculate the two % rows because they cannot simply sum up the value in each Resource Category, like what Q1_pre does. 

The weird thing is 100% and 50% are gone after I sorted the rows by using the sorted column Count Type (DIM) in the index table. Does anybody know what happened?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.