Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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! | |
User | Count |
---|---|
64 | |
59 | |
47 | |
33 | |
32 |
User | Count |
---|---|
84 | |
74 | |
54 | |
50 | |
44 |