The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, I would like to calculate whether the average proficiency of a year has increased or decreased from one year to the next.
For example, in 2021 the average proficiency was 250, in 2019 it was 240. What formula do I use to calculate this difference?
I used the sameperiodlastyear formula, but the results came back blank.
Solved! Go to Solution.
Hi @BárbaraBraga ,
Please try:
Measure =
var _pre=CALCULATE(SUM('Year-Value'[Value]),FILTER(ALL('Year-Value'),[Year]=MAX('Year-Value'[Year])-1))
return IF(SUM('Year-Value'[Value]) - _pre>0, "Increased","Decreased")
Best Regards.
Eyelyn Qin
If this post helps, please consider accept as solution to help other members find it more quickly.
Hi @BárbaraBraga ,
Please try:
Measure =
var _pre=CALCULATE(SUM('Year-Value'[Value]),FILTER(ALL('Year-Value'),[Year]=MAX('Year-Value'[Year])-1))
return IF(SUM('Year-Value'[Value]) - _pre>0, "Increased","Decreased")
Best Regards.
Eyelyn Qin
If this post helps, please consider accept as solution to help other members find it more quickly.
Hi, I'm new to Power Bi, so I have no idea if this sample is helpful.
But, basically, as I said, i want to calculate the diference of proficiency from one year to another.
I created a new column, to convert the edit column into date using the following formula: date(left(edit column), 4), 1,1)
However, the sameperiodlastyear formula is not working to make this difference calculation
Thank you very much for helping me.
it would be easier for all, if you can provide some sample data.
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |