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
BhavyaM
Helper V
Helper V

How to eliminate data using DAX

I have data as below,

 

BhavyaM_0-1637912939329.png

 

is there any way to elimate the first two rows data and Keep only Unique values in the visual.

please help.

 

Thanks in advance

 

6 REPLIES 6
v-henryk-mstf
Community Support
Community Support

Hi @BhavyaM ,

 

I seem to be a bit confused about your description. As shown in the screenshot below, according to your requirement, you need to group Product by category and then delete the rows whose Value values add up to 0. If the same Product has more than one column with the same value, how do I do it and what are the conditions based on?

vhenrykmstf_0-1638252634584.png


Please solve my confusion, so that I can do further testing. Looking forward to your feedback.


Best Regards,
Henry


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

Yes, If the same Product has more than one column with the same value we have to show only that non zero values. There is no other conditions only based on Category and Product we have to show the values which are not equal to 0

BhavyaM_0-1638275218507.png

 

Can anyone having solution. Please help on this.

BhavyaM
Helper V
Helper V

Using the above query it will elimate the Min date values. But what i want to show is for one category there will be multiple product and for each product there will be multiple date from and date to.

 

If any product is having different date from and date to or same date from and date to with below scenario

-13,700 +13,700 it will be = 0. So i want to remove this kind of data and keep only Unique values.

 

BhavyaM_0-1637916893396.png

 

amitchandak
Super User
Super User

@BhavyaM , Create this measure and use in visual level filter and check for non blank

if( max(Table[Date from]) = calculate(max(Table[Date From]), filter(allselected(Table), Table[Category Id] = max(Table[Category ID]))) , 1,balnk())

Using the above query it will elimate the Min date values. But what i want to show is for one category there will be multiple product and for each product there will be multiple date from and date to.

 

If any product is having different date from and date to or same date from and date to with below scenario

-13,700 +13,700 it will be = 0. So i want to remove this kind of data and keep only Unique values.

BhavyaM_0-1637917398875.png

 

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.