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

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

Reply
water-guy-5
Helper III
Helper III

How to get a data card to display the total sum of a measure

Hello,

I have a table that contains the "maximum limit" for a site, along with the result from a certain test. The Diff column is used to create a flag for when a site has a result that is greater than the limit.

The measures of the columns are:


Result=
AVERAGEX(
    KEEPFILTERS(VALUES('FactLabResults'[Analysis])),
    CALCULATE(AVERAGE('FactLabResults'[ResultTxt])
))
Limit = a set value in a table
Diff = a simple calculation that subtracts these two values

Flag

IF[Diff] > 0, 1, 0)


Here is a table that illustrates this.

waterguy5_1-1652802281181.png

 

I have successfully created a conditional format that highlights a site red when the difference > 0 aka flag = 1. This works on the row level, meaning when the table has the sites column included.

What I want is to be able to have a data card (pictured in the bottom right) that would display the total number of exceedences in this example. As of now, I believe that it is summarizing all of the values and since the total result is lower than the total limit for ALL sites, then it is displaying zero.

How do I fix this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @water-guy-5 ,

You can create a measure as below to get it and put this new measure onto your card visual.

Measure =
SUMX (
    GROUPBY ( 'FactLabResults', 'FactLabResults'[Code], 'FactLabResults'[Site] ),
    [Diff]
)

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @water-guy-5 ,

You can create a measure as below to get it and put this new measure onto your card visual.

Measure =
SUMX (
    GROUPBY ( 'FactLabResults', 'FactLabResults'[Code], 'FactLabResults'[Site] ),
    [Diff]
)

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors