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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors