Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I would like to create a new measure (in percentage) regarding what is the overall stability criteria regarding earnings for multiple companies. This is the table that I have:
Date | Company_Shortcut | Earnings |
2008-12-31 | MMM | 720347620 |
2008-12-31 | AOS | 23740234 |
2008-12-31 | SO | 72304726502 |
2008-12-31 | OZK | 2346700 |
2009-12-31 | MMM | 720357620 |
2009-12-31 | AOS | 13740234 |
2009-12-31 | SO | 72304756502 |
2009-12-31 | OZK | 2349700 |
2010-12-31 | MMM | 720307620 |
2010-12-31 | AOS | 19740234 |
2010-12-31 | SO | 72309056502 |
2010-12-31 | OZK | 2399700 |
I have created already 3 measures:
EARNINGS = SUM(Earnings[Earnings])
EARNINGS LY = Calculate([EARNINGS], SAMEPERIODLASTYEAR('Date'[Date]))
Diff Earnings = IF(ISBLANK([EARNINGS LY]),BLANK(),[EARNINGS]-[EARNINGS LY])
Solved! Go to Solution.
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 |
I did not get your last calculation. But find the solution to get that
https://www.dropbox.com/s/l5wivh9xwnm1bsi/positiveChanges.pbix?dl=0
@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 |
Check the file now. I think finally got what you wanted :https://www.dropbox.com/s/l5wivh9xwnm1bsi/positiveChanges.pbix?dl=0
thanks a lot!!!
User | Count |
---|---|
93 | |
83 | |
77 | |
71 | |
65 |
User | Count |
---|---|
114 | |
101 | |
96 | |
65 | |
60 |