Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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?
Solved! Go to Solution.
@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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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.
Thanks in advance.
@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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 =
ADDCOLUMNS (
SUMMARIZE ( Table, Table[Column1], Table[Column2] ),
"cErrors", [MS_ICB_Error_Difference]
)
RETURN
SUMX ( FILTER ( summary, [cErrors] > 0 ), [cErrors] )
Pat
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 =
ADDCOLUMNS (
SUMMARIZE ( Table, Table[Column1], Table[Column2] ),
"cErrors", [MS_ICB_Error_Difference]
)
RETURN
SUMX ( FILTER ( summary, [cErrors] > 0 ), [cErrors] )
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.