Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Can someone help me combine these two expressions:
1:
if(vChange=1,
num(sum(pick(match(Målepkt_Gruppering, 22), kWhVG)) - sum(kWh),'##0'), //numbers
num((sum(pick(match(Målepkt_Gruppering, 22), kWhVG)) - sum(kWh))/sum(kWhVG) ,'##,#%') //percentage
)
2:
Sum({<Uke= {$(= max(Uke-1))}>}kWh)
Sum({<Uke= {$(= max(Uke-1))}>}kWhVG)
info;
I have a pivot table that displays the difference between two values ( Diff HM-UM) and i want the right collum/row to show the same as Diff HM-UM but only the last week.
You know if i select week 6, i want the collum on the right to show me values for week 5.
Use Max(Uke)-1 instead of Max(Uke-1)
Sum({<Uke= {$(= max(Uke-1))}>}kWh) works fine, but i need to combine the expressions.
Join them togheter. not two different expressions.
This dosent work but i need something like this:
if(vChange=1,
num(sum(pick(match(Målepkt_Gruppering, 22), Sum({<Uke= {$(= max(Uke)-1)}>}kWhVG))) - Sum({<Uke= {$(= max(Uke)-1)}>}kWh),'##0'),
num((sum(pick(match(Målepkt_Gruppering, 22), Sum({<Uke= {$(= max(Uke)-1)}>}kWhVG))) - Sum({<Uke= {$(= max(Uke)-1)}>}kWh)/sum(kWhVG),'##,#%')
))
I have the impression that your expressions are more complicated as necessary - therefore try something like this:
num(sum(({< Målepkt_Gruppering = {22}>} kWhVG) - sum(kWh)) / if(vChange=1, sum(kWhVG), 1), if(vChange=1,'##0','##,#%'))
num(sum(({< Målepkt_Gruppering = {22}, Uke= {"$(=max(Uke)-1)"}>} kWhVG) - sum({< Uke= {"$(=max(Uke)-1)"}>} kWh)) / if(vChange=1, sum(kWhVG), 1), if(vChange=1,'##0','##,#%'))
- Marcus
thanks for reply, but it didnt work.. error in expressions..
I have a button that switch between number and percentage...
I want the collum on the right to show the same as Diff HM-UM, But only Last week.
so if i choose week 6, Diff HM-UM displays the difference in week 6, and then i want the collum on the right will automaticly show week 5.
Do you have som more suggestions?
An alternative would be to use two expressions either within a expression-group or with a visibility-condition.
- Marcus
No, i just want the "Diff HM-UM" to show Last week. and not the month, year or day i choose. a gruop dosent do this.
this one is okay and works fine, but i want another one that only display the values of last week. So i can compare weeks.
I think a small example with a few inline-data will be useful.
- Marcus