Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |