Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

reference Previous row using measures.

Hi,

 

I have to implement below SSRS condition in power Bi using Measures only.

Note: We have limitations we can't create any index column here so i need solution using measures only.

Source : Tabular model

Output column =IIF((Previous(Fields!Group_ID.Value) = Fields!Group_ID.Value),Nothing,Fields!Group_ID.Value)

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

Can you create data samples, one with data set that you are working on, and second with the desired outcome.

 
Best Regards,
Mariusz

 

Anonymous
Not applicable

Group ID | Output

A101 | A101

A101 |

A102 | A102

A102 |

A102 |

A103 | A103

A101 | A101

Hi @Anonymous 

I'm very sorry but its very hard to understand you requirement, are you looking to return distinct Values?

Is your output to be presented in a visual or ist just a table?

Are you going to use as a part of calculation?

 

Best Regards,
Mariusz

 

 

Anonymous
Not applicable

i need use this in table visual.

 

Requirement is not to calculate distinct values, it is like you have to check current row and previous row if both matching then replace id with blank.

 

 

Id |Name| 

1 |  abc

2 | pqr

1 | abc

 

for above example output should be same as input there is no consecutive same values.

take another example

 

Id |Name| 

1 |  abc

1 | abc

2 | abc

 

output is 

Id |Name| 

1 |  abc

   | abc

2 | abc

 

here we are replacing second row's id values with blank.

 

 

Hi @Anonymous 

 

Sorry but I don't think this can be achieved in power bi at the moment.

When adding column or columns to a visual it will perform a group by ( select a distinct combination of column values ) and measures can only aggregate so the below outcome is impasibe.

Id |Name| 

1 | abc

   | abc

2 | abc

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.