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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Coryanthony
Helper III
Helper III

Please help with totals / adjusting measure

I create a measure but the total in table does not match total on card.


My measure: 

PercentageTimeAudit = DIVIDE(SUMX(FILTER('Time Utilization', 'Time Utilization'[Stage] = "F&A-TE-Audit"), 'Time Utilization'[Hours]), [Total Hours])
 
On table, i have a filter "Hours Audit" greater than 0. 
 
So maybe i need to edit my measure to reflect? please see snip below. Percentage in table is what i want on card. We wouldnt want termed/inactive operator to fudge numbers. hence, the audit hours greater than 0.

Coryanthony_0-1699636088483.png

 

7 REPLIES 7
rsbin
Super User
Super User

@Coryanthony ,

Hoping if you apply the same Filter HoursAudit > 0 to the Card Visual, you should end up with the same value.

The next thing I would do is change the card visual to a table and compare the records in that table with the one you have posted.

If these don't resolve the issue, please paste sample data as text (not as a picture) or attach a sample pbix file and I will try to have a closer look.

Regards,

@rsbin Thank you for your response and time.
my measure : 

PercentageTimeAudit = DIVIDE(SUMX(FILTER('Time Utilization', 'Time Utilization'[Stage] = "F&A-TE-Audit"), 'Time Utilization'[Hours]), [Total Hours]
I want this to calculate only for operators w/ [Hours Audit] > 0 . 
 
The measure is currently calculating for inactive or employees who did not submit in hours.
any ideas?
 
Coryanthony_0-1699646303953.png

 



 

@Coryanthony ,

You can use the Filter Pane to apply [Hours Audit] > 0.  Apply this Filter to both your Table and your Card Visual.

Or, try this adjustment to your Measure:

PercentageTimeAudit = DIVIDE(SUMX(FILTER('Time Utilization', 'Time Utilization'[Stage] = "F&A-TE-Audit" && [Hours Audit] > 0 ), 'Time Utilization'[Hours]), [Total Hours])

@rsbin 

 

it does not appear i am able to add filter to the card. 
Also, formula is still calculating operators with 0 [hours audit]

Coryanthony_0-1699648393570.png

 

Hi @Coryanthony 

You can try the following measure

PercentageTimeAudit =
CALCULATE (
    DIVIDE (
        SUM ( 'Time Utilization'[Hours Audit] ),
        SUM ( 'Time Utilization'[Total Hours] )
    ),
    'Time Utilization'[Hours Audit] > 0,
    'Time Utilization'[Stage] = "F&A-TE-Audit"
)

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you

@Coryanthony ,

Are you able to attach your pbix file? 

Edit:  I have attempted to replicate some of your sample data

Please see pbix file attached.   Seems to work on my side.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.