Forum Discussion

AmandaHore's avatar
AmandaHore
Helper I
7 months ago
Solved

Hiding Rows where the grouped value is blank

I have this matrix that is total sales for the year.  I am wanting to compare for each client the sales between years.  But I want to exclude if they had no sales in one of the years.  

I have got the total sales for each year by using Sales Date and the Grouped feature (Bin) and have grouped by Year.  How do I then filter this where the total for the year is not blank.  

In the example below I want to show Row 3, Row 7, row 9 etc where this is a value in both columns.  

There is no measure used so I cannot compare the measures.  

 

Any guidance is appreciated.

Amanda  

 

 

 

  • AmandaHore 

     

    you can create a measure

     

    Measure =
    var _2024=sumx(FILTER('Table','Table'[year]=2024),'Table'[amount])
    var _2025=sumx(FILTER('Table','Table'[year]=2025),'Table'[amount])
    return if (ISBLANK(_2024)||ISBLANK(_2025),1)
     
    add this measure to the visual filter and set to not equals to 1
     
    pls see the attachment below

2 Replies

  • AmandaHore 

     

    you can create a measure

     

    Measure =
    var _2024=sumx(FILTER('Table','Table'[year]=2024),'Table'[amount])
    var _2025=sumx(FILTER('Table','Table'[year]=2025),'Table'[amount])
    return if (ISBLANK(_2024)||ISBLANK(_2025),1)
     
    add this measure to the visual filter and set to not equals to 1
     
    pls see the attachment below
  • AmandaHore 

     

    Measure:

    Has Both Years = 
    NOT(ISBLANK([Total Sales])) &&
    NOT(ISBLANK(CALCULATE([Total Sales], ALL(Sales Date[Year])))

     

    Matrix filter: [Has Both Years] = TRUE

     

    Shows only clients with sales in both years.

     

    If this answer helped, please click 👍 or Accept as Solution.
    -Kedar
    LinkedIn: https://www.linkedin.com/in/kedar-pande