The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I have data from 3 separate studies. I have combined the data into one table with a column marking each row as coming from Study A, Study B, or Study C. I can show visuals or grids that separate my measures/data by Study easily however I would like to calculate the differences in different aggregates (study over study growth) between Study C and Study B, and Study B and Study A. Is there a way to do this? I know how to do this with time functions (sameperiodlastyear), but not a column that segregates data by text value.
If anyone has any ideas I'd appreciate the help,
Sharon
Solved! Go to Solution.
In this scenario, to do a "Study over Study" comparison, you can create a numeric column marking different studies like 1,2,3,etc. Then you can create a calculated column to get the Previous Study Total.
Previous Study Total = CALCULATE(SUM(Table2[Value]),FILTER(Table2,Table2[study number]=EARLIER(Table2[study number])-1))
Then you can create a measure to calculate the growth percentage.
Study Over Study Growth = AVERAGE(Table2[Previous Study Total])/CALCULATE(SUM(Table2[Value]))
Regards,
In this scenario, to do a "Study over Study" comparison, you can create a numeric column marking different studies like 1,2,3,etc. Then you can create a calculated column to get the Previous Study Total.
Previous Study Total = CALCULATE(SUM(Table2[Value]),FILTER(Table2,Table2[study number]=EARLIER(Table2[study number])-1))
Then you can create a measure to calculate the growth percentage.
Study Over Study Growth = AVERAGE(Table2[Previous Study Total])/CALCULATE(SUM(Table2[Value]))
Regards,
Hi Simon
Do you know why I am receiving this error? My study number is number, it's basically 1,2 or 3 from a conditional column based on study ie Study = A, then 1 etc.
error says EARLIER/EARLIEST refers to an earlier row context which doesn't exist. I can't seem to enter any columns after EARLIER.
Thank you! This is the better solution as I add studies down the road, I can increase the numeric values to match. I appreciate the direction. So easy once you see it.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the July 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
109 | |
67 | |
46 | |
41 |
User | Count |
---|---|
186 | |
85 | |
76 | |
74 | |
56 |