Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have a pivot with an expression:IF(min(Month_name)>=(vCurMonth),Sum(Sal*Bench_Data),Sum({<Y={'2015'}>}Fact_bench))
Q1 | Q2 | Q3 | Q4 | |
BG_bench | Bench 2015, USD | Bench 2015, USD | Bench 2015, USD | Bench 2015, USD |
BG1 | 77,360 | 70,660 | 122,394 | 176,394 |
BG2 | 0 | 0 | 0 | 0 |
BG3 | 0 | 0 | 0 | 0 |
BG4 | 0 | 0 | 0 | 0 |
BG5 | 0 | 0 | 0 | 0 |
BG6 | 0 | 0 | 0 | 0 |
BG7 | 0 | 0 | 0 | 0 |
BG8 | 0 | 0 | 0 | 0 |
Total | 77,360 | 70,660 | 122,394 | 176,394 |
It works perfectly with quarters, but it doesnt work in 'Total'. The 'Total' shows me only the result of the 1st quarter.
Any ideas how to fix this prob?
It would be great if you can share sample application
try this
IF(min(Month_name)>=Sum(Sal*Bench_Data),Sum({<Y={'2015'}>}Fact_bench))
or
IF(min(Month_name)>=(here create/put ur variable for year),Sum(Sal*Bench_Data),Sum({<Y={'2015'}>}Fact_bench))
Nope, this doesnt give me any result
or reset Month_name
Sum({<Y={'2015'},Month_name=>}Fact_bench)
try to use total where datedimension should
Sum(total <yourdatedimension>{<Y={'2015'}>}Fact_bench)
Here is my sample data. As u can see total isnt calculated corrreclty because of the IF statement, and the calculated dimension isnt working also
change your variable to date((today()),'MMM'), if you use the monthname function QV will consider it a string, but in your script you are actually setting it as a date
When I change the variable to date((today()),'MMM') the expression isnt working