The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi can anyone help with this , Fp's are described in text Format so created the following to lookup the offset Fp.
Result_Previous_Period =
--WHATS CURRENT SELECTION
VAR Fp_Selected = SELECTEDVALUE(DATES[FpName], "No Selection")
--LOOK UP INDEX NUMBER OF CURRENT SELECTION
VAR FP_Current_LookupIndex = LOOKUPVALUE(Fp_Index[Index],Fp_Index[FpName],[Fp_Selected])
--ADD +1 TO CURRENT INDEX NUMBER
VAR Fp_Previous_Period_Create_offset = FP_Current_LookupIndex+1
--LOOK UP USING NEW INDEX NUMBER THE PREVIOUS "Fp Name"
VAR Fp_Previous_Period = LOOKUPVALUE(Fp_Index[FpName],Fp_Index[Index],Fp_Previous_Period_Create_offset)
--FAILS AT THIS POINT DOING SIMPLE LOOKUP BUT SEEMS TO IGNORE Fp_Previous_Period
VAR Previous_Value = LOOKUPVALUE('Tram Performance Excel Metis'[Punctuality],'Tram Performance Excel Metis'[FPName],Fp_Previous_Period)
RETURN
Fp_Previous_Period
Each step works up until last key step where i get a blank returned
VAR Previous_Value = LOOKUPVALUE('Tram Performance Excel Metis'[Punctuality],'Tram Performance Excel Metis'[FPName],Fp_Previous_Period)
Tram Performance Excel Metis' = Main data Table
Fp_Index = Grouped Table by Fp with index column
Hope thats enough info & thanks for any help in advance
Solved! Go to Solution.
Found resolution thanks , when trying to return this as a measure I get a blank however if I turn this same measure into a column the results are returned & usable ;0)
Thanks
Hi can anyone help with this , Fp's are described in text Format so created the following to lookup the offset Fp.
Result_Previous_Period =
--WHATS CURRENT SELECTION
VAR Fp_Selected = SELECTEDVALUE(DATES[FpName], "No Selection")
--LOOK UP INDEX NUMBER OF CURRENT SELECTION
VAR FP_Current_LookupIndex = LOOKUPVALUE(Fp_Index[Index],Fp_Index[FpName],[Fp_Selected])
--ADD +1 TO CURRENT INDEX NUMBER
VAR Fp_Previous_Period_Create_offset = FP_Current_LookupIndex+1
--LOOK UP USING NEW INDEX NUMBER THE PREVIOUS "Fp Name"
VAR Fp_Previous_Period = LOOKUPVALUE(Fp_Index[FpName],Fp_Index[Index],Fp_Previous_Period_Create_offset)
--FAILS AT THIS POINT DOING SIMPLE LOOKUP BUT SEEMS TO IGNORE Fp_Previous_Period
VAR Previous_Value = LOOKUPVALUE('Tram Performance Excel Metis'[Punctuality],'Tram Performance Excel Metis'[FPName],Fp_Previous_Period)
RETURN
Fp_Previous_Period
Each step works up until last key step where i get a blank returned
VAR Previous_Value = LOOKUPVALUE('Tram Performance Excel Metis'[Punctuality],'Tram Performance Excel Metis'[FPName],Fp_Previous_Period)
Tram Performance Excel Metis' = Main data Table
Fp_Index = Grouped Table by Fp with index column
Hope thats enough info & thanks for any help in advance
Found resolution thanks , when trying to return this as a measure I get a blank however if I turn this same measure into a column the results are returned & usable ;0)
Thanks