Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have one column like this
City
A
A
B
C
C
and my requirement is if previous(city)=city then 0 else city and first one should be 0
So output
city Column
A 0
A 0
B B
C C
C 0
I have below SSRS logic
IIF(Previous(Fields!name.Value) = Fields!name.Value,"",Fields!name.Value )
I want to implement it in Power BI.
Note: My source is Azure Analysis Services so I can not create index column
e.g
Name output
A
A
B B
C C
Output = IF(CALCULATE(COUNT(Table1[Source]),FILTER(Table1,Table1[Source]=EARLIER(Table1[Source])))>1,"",Table1[Source])
I want measure not calculated column as my source is AAS. it won't allow creation of new calculated column
@Anonymous Please add an Index column in "Power Query Editor" and then add a new column in Data Pane as below
CheckPrev = VAR _PrevRow = LOOKUPVALUE(Test242PrevRow[City],Test242PrevRow[Index],Test242PrevRow[Index]-1) RETURN IF(Test242PrevRow[City]=_PrevRow || Test242PrevRow[Index] = 1,"0",Test242PrevRow[City])
Proud to be a PBI Community Champion
and in real time scenario i don't know how many rows are there so please provide dynamic solution
Is it possible without adding column?
@Anonymous Don't think it's possible without having any supporting field to lookup on to retrieve next or previous row logic.
It's a dynamic solution and it will work irrespective of number of rows in your table....
Proud to be a PBI Community Champion
AS my data source is AAS so it won't allow me to create column and it only allow me to create measure