Forum Discussion

avendanof's avatar
avendanof
Icon for Helper I rankHelper I
8 years ago

sort by column and all filter

I have a field in a date table which has the names of the months DimFechas[NombreMes] and another column which has the numbers of the months DimFechas[numeromes]. The column DimFechas[NombreMes] is sorted by the column  DimFechas[numeromes] Then I have a formula which uses a filer all like this one:  total meses = CALCULATE([Total ventas];ALL(DimFechas[NombreMes]))

[TotalVentas] is a messure with the total sales

I´ve expeted that this formula summarizes year by year for all the months the same number, that is the total sales like this (see total meses):

 

But what is happening is this:

 

 

So it seems that the sort by column is overriding the all filter in the formula.

 

Is there a way to fix this instead of using a field with the month number instead of the month name?

2 Replies

  • Hi avendanof,

     

    Your total meses Measure should work. Please refer to my sample:

     

    Source Table

     

    According to your second screenshot, it seems like there exists a blank space in the column name "NombreMes" in Matrix as "Nombre Mes". Please check if you are using the right column.

     

    Btw, with only screenshots it helps little. So if it is possible, please share us your pbix file with One Drive or Google Drive. So that I can dig deeper and make some tests.

     

    Thanks,
    Xi Jin.

     

    • avendanof's avatar
      avendanof
      Icon for Helper I rankHelper I

      Hi, I´m sending you an example. You may see that the formula "Total Month" has an All() filter that is not working, unless you take out the "sort by column" applied to the column "Nombre mes" in the table DimFechas using the field "numero mes" from the same table to sort.

      So I think this is not working properly.

       

      Example file

       

      Let me know if you was able to download the file.

       

      Thanks a lot.