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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
smpa01
Super User
Super User

Maximum size subset with given sum

Hello experts,

 

I have a data set, e.g. as following

 

Raw Data={1,2,3,4,5,6,-0.75,-0.25,-1,-1,-3,-3.5,-0.5,-12}

 

I want to create a subset of this data which would include max number of members where the sum of all those memebrs would equate to 0.

Desired = {1,2,3,4,-0.75,-0.25,-1,-1,-3,-3.5,-0.5}

SUM=0

 

Any help is greatly appreciated.

Thanking you in advance.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 REPLY 1
smpa01
Super User
Super User

Hello experts,

 

Is there any way to achieve this by using DAX? This can be easlily done using R script.

 

But I can't utilize R script to generate a measure to be displayed on a PBI native viz.

 

Any help is greatly appreciated.

 

Thank you in advance.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.