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.
Hello,
I need help. I have two tables , the first is lookup table (google sheet) and second is the main table. I want to create a new column in main table with information of first table. There are two rules WeekStartingDate(first table)=WeekStartingDate(main table) and Dispatcher(first table)=Dispatcher(main table) that need to be met and AdjRevenue(value) which I need to bring in the new column .But the value(AdjRevenue) I need to be put only in first row when the rules match. Like in the picture I need to have -1000 only ones, in the first row that matchs the r
Solved! Go to Solution.
@EmilijaN , Add an index column in the main table where you want add this column
add in you column
var _1 = minx(filter(maintable, [WeekStartingDate] =earlier([WeekStartingDate]) && [Dispatcher] = earlier([Dispatcher]), [Index])
var _2 =<your formula>
return
if([Index] =_1, _2, blank())
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
@EmilijaN , Add an index column in the main table where you want add this column
add in you column
var _1 = minx(filter(maintable, [WeekStartingDate] =earlier([WeekStartingDate]) && [Dispatcher] = earlier([Dispatcher]), [Index])
var _2 =<your formula>
return
if([Index] =_1, _2, blank())
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
Do you mean like this?
VAR _1 = minx(filter(Trip_Activity, Trip_Activity[SH_DelDate] =earlier(Trip_Activity[SH_DelDate]) && Trip_Activity[Dispatcher] = earlier(Trip_Activity[Dispatcher]), Trip_Activity[Index]))
VAR _2 =CALCULATE (
SELECTEDVALUE ( Comm_Base_Link_Adj_Dispatch[Adj_Comm_GrossBase]),
FILTER (
Comm_Base_Link_Adj_Dispatch,(Comm_Base_Link_Adj_Dispatch[WeekStartingDate]=Trip_Activity[SH_DelDate] && Comm_Base_Link_Adj_Dispatch[Dispatcher]=Trip_Activity[Dispatcher])
))
return
if([Index] =_1, _2, blank())
I tried. There is some error :The syntax for 'var_pom2' is incorrect.