Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello fellow PowerBI Users,
i want to divide the value from the Today with the value from yesterday per RES_NR and put it in a new Column so i can easily print the % next to the days in the same Visuals.
I get the Date from the Column HIS_DATE and the Values from the Column ENGPASS.
I tried it for an hour now and im hoping someone is able to help me.
Greetings,
Steallight
Solved! Go to Solution.
Hi @Anonymous - Calculate the percentage change between the values from today and yesterday per RES_NR and put it in a new column.
Percentage_Change =
VAR Today_Value = [ENGPASS]
VAR Yesterday_Value =
CALCULATE(
FIRSTNONBLANK([ENGPASS], 1),
FILTER(
ALL('YourTable'),
'YourTable'[HIS_DATE] = TODAY() - 1 && 'YourTable'[RES_NR] = EARLIER('YourTable'[RES_NR])
)
)
RETURN
IF(
ISBLANK(Yesterday_Value),
BLANK(),
DIVIDE(Today_Value - Yesterday_Value, Yesterday_Value)
)
Above calculated column today's and yesterday's values for each RES_NR and returns the result in a new column called Percentage_Change If there is no value for yesterday, it returns blank.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
New =
var _today=TODAY()
var _todayvalue=
SUMX(FILTER(ALL('Table'),'Table'[HIS_DATE]=_today&&'Table'[RES_NR]=EARLIER('Table'[RES_NR])),[ENGPASS])
var _yesterday=
SUMX(FILTER(ALL('Table'),'Table'[HIS_DATE]=_today-1&&'Table'[RES_NR]=EARLIER('Table'[RES_NR])),[ENGPASS])
return
DIVIDE(
_yesterday,_todayvalue)
2. Select [New] -- %.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous - Calculate the percentage change between the values from today and yesterday per RES_NR and put it in a new column.
Percentage_Change =
VAR Today_Value = [ENGPASS]
VAR Yesterday_Value =
CALCULATE(
FIRSTNONBLANK([ENGPASS], 1),
FILTER(
ALL('YourTable'),
'YourTable'[HIS_DATE] = TODAY() - 1 && 'YourTable'[RES_NR] = EARLIER('YourTable'[RES_NR])
)
)
RETURN
IF(
ISBLANK(Yesterday_Value),
BLANK(),
DIVIDE(Today_Value - Yesterday_Value, Yesterday_Value)
)
Above calculated column today's and yesterday's values for each RES_NR and returns the result in a new column called Percentage_Change If there is no value for yesterday, it returns blank.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |