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
Anonymous
Not applicable

Percentage does not equal numerator / denominator

I need some help with a %. There are three objects here. One % on a card, one showing the numerator & denominator, and a text box with a target. 488 / 1185 = 41.2%....not 43%. I've validated they are both coming from the same columns, as seen below. The value of the variables is the same. One is showing the numerator & denominator, and one is doing the calculation.
 
 
num_denom.png
The % is coming from this measure:
Measure2 =
var SumIsCompPct = SUM(WorkItem_rollup[IsCompliant])
var SumIsCompTotPct = SUM(WorkItem_rollup[Total])
return DIVIDE(SumIsCompPct,SumIsCompTotPct,0)

The Num/Denom text is coming from the measure:
2_NumDenom =
var SumIsComp = SUM(WorkItem_rollup[IsCompliant])
var SumIsCompTot = SUM(WorkItem_rollup[Total])
return "(" & SumIsComp & " / " & SumIsCompTot & ")"

 

Does anyone know why I get an incorrect 43%? Oh, data types are:

IsCompliant: Whole Number
Total: Whole Number
Measure2: Percentage of precision 2
2_NumDenom : Text

Thanks!

1 ACCEPTED SOLUTION

@Anonymous  change the topN filter and manually select the filter value.


Regards,
Nandu Krishna

View solution in original post

6 REPLIES 6
nandukrishnavs
Super User
Super User

@Anonymous 

 

Check if there is any visual level filter applied or not?

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Anonymous
Not applicable

Great idea! However, they are both filtered only by the date.

 

filter on Pct.pngfilter_numDenom.png

 

 

@Anonymous  - can you add both measures into the table visual and share the snapshot, please.


Regards,
Nandu Krishna

Anonymous
Not applicable

I put those two items in a table and got what I would expect.  It appears to be an issue with the card object that shows the 43%.

data as table.png

@Anonymous  change the topN filter and manually select the filter value.


Regards,
Nandu Krishna

Anonymous
Not applicable

I went to change the Timeseries_DT filter to basic filtering (which defaulted to the earliest date). I changed to the last date, and it didn't change. That's strange. I poked around and the issue is that most tables have a "Timeseries_DT" field that is the date of every row. Somehow, the % card was pulling from another table's "Timeseries_DT" column. I made it the correct one, and it works!

 

Thank you for helping me back up and work this issue out!

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.

Top Kudoed Authors