Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have declare the following :
MonthPeriod:
Load * inline [
Fiscal Month,Period
Jul,1
Aug,2
Sep,3
Oct,4
Nov,5
Dec,6
Jan,7
Feb,8
Mar,9
Apr,10
May,11
Jun,12
];
one variable : vPrevious :Month(AddMonths(Date(Today()),-1)) which gets the value " feb "
I want to use the value 8 from the inline function MonthPeriod for the below expression :
sum({<[fis_period] = {8} >}[Stag Forecast Units])
as fis_period use 8 instead of feb .
But the above query is incorrect . Please help me to write the expression.
Hi,
Go to vw_fact_dop_forecast_stagger table
rename fis_period field as Period
OR
fis_period field as [Fiscal Period]
So that You can create Link between vw_fact_dop_forecast_stagger and Your Inline Table
Then Use Your Expression,
It will work correctly,
Regards,
SUM({<[fis_period] = {'$(=NUM(Month(AddMonths(Today(),-1))))'}>}[Stag Forecast Units])
you need to add a group by --> all fields that are not part of an aggregation in this table, e.g.
load
DimA,
DimB
sum({<[fis_period] = {8} >}[Stag Forecast Units]) as fis_period use 8 instead of feb
group by DimA, DimB
sql selectz...;
are you getting any error.
Expression above seems correct.. please explain what issue you are getting.
But this expression is giving value 2 . I dont want that ....
I want Feb,8 thats why I wrote the Inline function.
How to get feb = 8 in the above expression.
Find Attachment.
In expression change your dimension name.
Instead of fis_period use Period.
--Jai
Hi,
You can do this in script level .
Instead of Creating Inline table your script you can do this way
if(num(month(CalenderDate)) >6,num(month(CalenderDate))-6,num(month(CalenderDate))+6) as FiscalMonth
Regards,
I am using this expression :
SUM({<[fis_period] = {'$(=NUM(Month(AddMonths(Today(),-1))))'}>}[Stag Forecast Units])
the following exp :'$(=NUM(Month(AddMonths(Today(),-1))))' is giving value 2
but Instead of 2 I want 8 .
Thus, I have declare :
MonthPeriod:
Load * inline [
Fiscal Month,Period
Jul,1
Aug,2
Sep,3
Oct,4
Nov,5
Dec,6
Jan,7
Feb,8
Mar,9
Apr,10
May,11
Jun,12
];
But how to write the expression to get the value of :'$(=NUM(Month(AddMonths(Today(),-1))))' as 8 insteat of 2.
Or try this.. this should work..
=SUM({<[fis_period] = {"$(=Month(AddMonths(Today(),-1)))"}>}[Stag Forecast Units])
=SUM({<[Fiscal Month] = {"$(=Month(AddMonths(Today(),-1)))"}>}[Stag Forecast Units])
How I can use the following expression instead of above :
=SUM({<[Period] = {8}>}[Stag Forecast Units])
as [Stag Forecast Units] field doesnot depend on [Fiscal Month] but depends on [Period] i.e ex , 8 for month feb