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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
XAVICHETAPIA
Frequent Visitor

Filtering table by Duplicated ReservationNumber

Dear,

 

I'm trying a simple measure but first I need to know how to filter a table.

In the table each "NumReservation" has many rows, all with the same "Lead" value.

 

TABLE:

XAVICHETAPIA_0-1655391200021.png

 

I would need to filter the table giving only a row by "Numreservation".
Like this.

 

WANTED TABLE

XAVICHETAPIA_1-1655391428881.png

 

WANTED TABLE = FILTER ( TABLE,  ???   )

Thankyou in advance,

Xavichetapia 

 

 

1 ACCEPTED SOLUTION

Hi, @XAVICHETAPIA 

You need create a column with a unique index in ‘Transform Data’  first.

(The column 'KPI'[indice] in the example you provided seems to contain duplicate values.)

Then you can create measure like:

Measure =
VAR min_indice =
    CALCULATE ( MIN ( 'KPI'[indice] ), ALLEXCEPT ( 'KPI', 'KPI'[NumReserva] ) )
RETURN
    IF ( SELECTEDVALUE ( 'KPI'[indice] ) = min_indice, 1, 0 )

And drag this measure to visual filter pane to filter data as below:

veasonfmsft_0-1655794819858.png

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
mh2587
Super User
Super User

Duplicated ReservationNumber=
CALCULATE (  
COUNT ( [Numreservation] ), FILTER ( Dim_Employments, [Numreservation] = EARLIER ( [Numreservation] ),FILTER ( Dim_Employments, [Lead] = EARLIER ( [Lead] ))


) )

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Dear,

 

I found an error when using the EARLIER function.  

XAVICHETAPIA_0-1655393578784.png

I attached the pbix.

 

https://drive.google.com/file/d/1u9IDBpijtJVKtHLYnQlgEq8MI9yWJx0f/view?usp=sharing

 

My table is called KPI.

 

thks

Hi, @XAVICHETAPIA 

You need create a column with a unique index in ‘Transform Data’  first.

(The column 'KPI'[indice] in the example you provided seems to contain duplicate values.)

Then you can create measure like:

Measure =
VAR min_indice =
    CALCULATE ( MIN ( 'KPI'[indice] ), ALLEXCEPT ( 'KPI', 'KPI'[NumReserva] ) )
RETURN
    IF ( SELECTEDVALUE ( 'KPI'[indice] ) = min_indice, 1, 0 )

And drag this measure to visual filter pane to filter data as below:

veasonfmsft_0-1655794819858.png

Best Regards,
Community Support Team _ Eason

PBC.PNG

I got this , it suits or not


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors