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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
dkushner
Frequent Visitor

selecting rows with max/unique value

Hi Everyone,

 

Can someone help me with the following scenario. I even don’t understand how I should solve it..

I have a table of values

ID

CounterNumber

ReqDateT

DataDateT

SummAPlus

68511

139

2018-02-06 17:14:45.000

2018-02-05 00:00:00.000

11632,8

68512

139

2018-02-06 17:14:54.000

2018-02-05 00:00:00.000

11632,8

68529

149

2018-02-06 17:17:16.000

2018-02-05 00:00:00.000

1075

68530

149

2018-02-06 17:17:20.000

2018-02-05 00:00:00.000

1075

68599

1

2018-02-06 17:22:51.000

2018-02-05 00:00:00.000

4933,6

68600

1

2018-02-06 17:22:55.000

2018-02-05 00:00:00.000

4933,6

68629

139

2018-02-06 21:00:16.000

2018-02-05 00:00:00.000

11632,8

68638

149

2018-02-06 21:02:23.000

2018-02-05 00:00:00.000

1075

68673

1

2018-02-06 21:06:54.000

2018-02-05 00:00:00.000

4933,6

68159

139

2018-02-05 07:00:24.000

2018-02-04 00:00:00.000

14162,4

68168

149

2018-02-05 07:02:31.000

2018-02-04 00:00:00.000

926,8

68203

1

2018-02-05 07:07:43.000

2018-02-04 00:00:00.000

5631,6

68218

139

2018-02-05 12:24:19.000

2018-02-04 00:00:00.000

14162,4

68219

139

2018-02-05 12:24:28.000

2018-02-04 00:00:00.000

14162,4

68236

149

2018-02-05 12:26:50.000

2018-02-04 00:00:00.000

926,8

68237

149

2018-02-05 12:26:55.000

2018-02-04 00:00:00.000

926,8

68304

1

2018-02-05 12:33:35.000

2018-02-04 00:00:00.000

5631,6

I need to select rows with max(or unique) value of “SummAPlus” for each “CounterNumber” for each “DataDateT”

Further I’ll calculate a sum of “SummAPlus” for the whole month/year and use it in other measures, so I need to select only 1 value for the period(DataDateT)

And I don’t understand what should I do, create the new table with cleaned data (1 Date = 1 Row ), or it may be somehow selected by a measure?

4 REPLIES 4
hthota
Resolver III
Resolver III

HI,

 

The above result is enough for you or anything elsePIC1.PNG

I hope yes, if I normalize the table this way I can work with it 

Keep the DataDateT as Latest then you can get the required data formatPic2.PNG

sorry, but for me it is just visualization, but I need to prepare date for the following usage in calculations.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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