Forum Discussion
Count if earning positive
- 6 years ago
Check the file now. I think finally got what you wanted :https://www.dropbox.com/s/l5wivh9xwnm1bsi/positiveChanges.pbix?dl=0
This type of calc required context day of the month, calculation like this will help
overall = countX(values(Table[Date]),[Diff Earnings])
count positive overall = sumX(values(Table[Date]),if([Diff Earnings]>0,1,0))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
amitchandakThe overall measure works but not the second one. I get a blank.
The overall output should look like that:
| Company_Shortcut | Stability Earnings |
| MMM | 0.5 |
| AOS | 0.5 |
| SO | 1 |
| OZK | 1 |
- amitchandak6 years ago
Super User
I did not get your last calculation. But find the solution to get that
https://www.dropbox.com/s/l5wivh9xwnm1bsi/positiveChanges.pbix?dl=0
- Anonymous6 years agoNot applicable
amitchandakthank you so far, but I still do not get the output that I need. I have the same formulas that you provided but I always get for diff count = 1 and pos count = 1 for each company. This cannot be true. This should give me sth like this:
Company_Shortcut pos count diff count stability (pos count / diff count) MMM 1 2 0.5 AOS 1 2 0.5 SO 2 2 1 OZK 2 2 1 - amitchandak6 years ago
Super User
Check the file now. I think finally got what you wanted :https://www.dropbox.com/s/l5wivh9xwnm1bsi/positiveChanges.pbix?dl=0