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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SidharthK16
Frequent Visitor

Lookupvalue within same column

Hi All,

I have a table listing Respondent Id's and Brand.
2nd table with time period as months .

I want to check the Repeat Rate of Respondent Id's with different Months(Like if in April we have 100 Respondent Id's and in May we have 200 Respondent Id's, So what all Respondent Id's have been repeated in the May month.)

Sharing excel dummy data,
So in excel we can do this with vlookup function .


MonthRepondent IdBrand MonthBrandRepondent IdVlookup
AprilASprite MaySpriteAA
AprilBSprite MaySpriteBB
AprilCSprite MaySpriteCC
AprilDSprite MaySpriteG 
AprilESprite MaySpriteh 
 Count Of Respondent Id5   Count of Repeated Respondent Id's3

 Can you please guide me how can we achieve this in Powerbi?

9 REPLIES 9
v-yanjiang-msft
Community Support
Community Support

Hi @SidharthK16 ,

According to your description, you don't want the month to fixed. In my understanding, for each month, you just want to calculate the number of repeated RespondentID comparing with the previous month.

I create a sample.

vkalyjmsft_0-1666249522573.png

Here I use number to display the month, if you haven't it like me, you can create one or a rank based on year-month is also OK. Here's my solution, create a calculated column.

Column =
IF (
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Month]
                = EARLIER ( 'Table'[Month] ) - 1
                && 'Table'[Repondent Id] = EARLIER ( 'Table'[Repondent Id] )
        )
    ) > 0,
    1,
    0
)

Get the result.

vkalyjmsft_1-1666249711196.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks for solution!

But what if I have Multiple months like Jan, Feb ,March, April, May etc.
And I have to check Repeat rates for Jan and March

 

Hi @SidharthK16 ,

Do you mean for each month, you need to check all the previous months? eg for May, need to check repeat with Jan, Feb ,March, April seperately?
Best Regards,
Community Support Team _ kalyj

No no
Just for two months
Like what all are in Jan are reapeated in March.

 

Hi @SidharthK16 ,

What's the logic which two months are compared, if you don't want the formula to be fixed.

Best Regards,
Community Support Team _ kalyj

I have two different slicers for time period

Hi @SidharthK16 ,

If all time period are in the same column, and we put the column in two slicers. We can't select different values in the two slicers unless we remove the interaction. But if we remove interaction, we can't pick the value selected in the slicer.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@SidharthK16 Use INTERSECT.

Measure =
  VAR __April = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Month] = "April"),"__ID",[Respondent Id]))
  VAR __May = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Month] = "May"),"__ID",[Respondent Id]))
RETURN
  CONCATENATEX(INTERSECT(__May, __April),[__ID],",")
  


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks Greg for you solution.
But this is not working for me .

VAR __April = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Month] = "April"),"__ID",[Respondent Id]))

I don't want my month to fixed, user can select any month as per their need like June , July and also The respondent Id are in a column but here we have to add the measure at the end.


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.