cancel
Showing results for
Did you mean:
Regular Visitor

## Measure Calculation

Hi

I hope you can assist please.
I have a measure (measeure error diff) that is calculating the difference between two measures, errors today minus errors yesterday.
The results can be zero, positive or negative numbers.
Many say that one cannot sum a measure, is this true?
I am looking for a way to sum the values of a measure that are >0 and display this value in a Card.

So in a Card I would like to see the number 29 (7+6+6+5+5)

Could the below fourmula be modified?

POS_Error_Difference = COUNTROWS(FILTER('ICB Checks','ICB Checks'[MS_ICB_Error_Difference]>0))

Many Thanks
Dylan
1 ACCEPTED SOLUTION
Super User IV

@Dylan24 I figured those were measures but your pic doesn't show what column(s) are in the visual (so I gave generic Column1, Column2 solution.  Is there a Date column there?  If so, you would use that Date column in that SUMMARIZE (or if it's just one column, you can use DISTINCT or VALUES instead).

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

5 REPLIES 5
Regular Visitor

Hi Pat,

Thank you for the feedback.

I think I understand where you are going with the above formula, the only issue is that Yesterdays Errors and Todays Errors columns in the diagram are Measures, so when I try use your formula I dont have Table[Column1], Table[Column2] to add as they are measures and not identified when I search for them.

I have below the full table:

The Total Error Difference between the two measures (Today - Yesterday = 5)
What I want is to create is a new measure that sums only the red flag items (items >0)

Further down in this table there are also green flag items which show negative numbers. Although 5 is the correct Total difference the sum of the red flags only is also needed to show system exceptions produced daily.

This measure will than be added to a single card visualisation.

Super User IV

@Dylan24 I figured those were measures but your pic doesn't show what column(s) are in the visual (so I gave generic Column1, Column2 solution.  Is there a Date column there?  If so, you would use that Date column in that SUMMARIZE (or if it's just one column, you can use DISTINCT or VALUES instead).

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

Regular Visitor

Yes and "YES", I brought in the column that defines the flag and I have my number.
Thank you for the guidance 😀

I assume your measure doesn't show 29 already in your card.  If not, since your pic doesn't show which columns are in that visual (just the measures), the DAX patter you need is one like this

Total Errors vs Prev Days =
VAR summary =
SUMMARIZE ( Table, Table[Column1], Table[Column2] ),
"cErrors", [MS_ICB_Error_Difference]
)
RETURN
SUMX ( FILTER ( summary, [cErrors] > 0 ), [cErrors] )

Pat

Super User IV

I assume your measure doesn't show 29 already in your card.  If not, since your pic doesn't show which columns are in that visual (just the measures), the DAX pattern you need is one like this

Total Errors vs Prev Days =
VAR summary =
SUMMARIZE ( Table, Table[Column1], Table[Column2] ),
"cErrors", [MS_ICB_Error_Difference]
)
RETURN
SUMX ( FILTER ( summary, [cErrors] > 0 ), [cErrors] )

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

#### Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors