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
javieregh
Frequent Visitor

DAX - Aggregation same column, compare and delete if rows is the same

I need to sum the same column and compare total column if the sum both column is zero I don't need or hidde to show this rows.


This is dynamic matrix in DAX.

VAR DefaultOfferValue =
SWITCH ( SelectedMeasureVal, "Home1, MAX ( value1 ), "Home2", MAX ( value2 ), "Home3", SUM ( value3 ), " Total99",
sumx (home1 +home2 +home3)....

return
DefaultOfferValue

javieregh_0-1617745751250.png

 




5 REPLIES 5
javieregh
Frequent Visitor

@edhans Please see below current situation an excepted results:

total.png

This is dynamic matrix in DAX.

VAR DefaultOfferValue =
SWITCH (
SelectedMeasureVal,
"Home1, MAX ( value1 ),
"Home2", MAX ( value2 ),
"Home3", SUM ( value3 ),
" Total99",sumx (home1 +home2 +home3)....

return
DefaultOfferValue


Thanks a lot

javieregh
Frequent Visitor

@Xiaoxin Sheng I saw in several posting you have all experience in matrix. Could you please take look my issue thanks so much...

edhans
Super User
Super User

Use the filter pane. Let your measure calculate whatever is needed. Then:

  1. Select the visual
  2. expand the filter pane
  3. in the section "Filter for this visual" expand the measure filter
  4. Filter as desired. Is not equal to zero, or is not blank would work if you returned BLANK() as the result.
  5. edhans_1-1617749131388.png

     

    edhans_0-1617749109868.png


Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

thanks @edhans  for your help.  But my problem also is that I need to sum "total column" that have the same name .

Then provide some data with expected results per links and instructions below. Please try to include ALL requirements in your post so we can attack all of the issues.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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