Forum Discussion

Miquel_llado's avatar
Miquel_llado
New Member
5 years ago

Would this setup work?

I'm trying to make an accounting balance and I'm trying to set up the model. As far as I went I have something like this (just a sample):

IdNameTypeSums 
1312. Otros resultadossuma-678,778<- sums rows starting with these values from another table ("-" substracts the value)
14A) RESULTADO DE EXPLOTACIÓN (1+2+3+4+5+6+7+8+9+10+11+12)total1,2,3,4,5,6,7,8,9,19,11,12,13<- sums rows with these Id's in this table
15 literal <- Shows an empty row as a separator between sections

 

Would it work? Can I set a CALCULATE filter based on the "sums" column information (like "sum every row starting with any of these values)? How would you recommend me to proceed?

 

Thank you in advance.

2 Replies

    • Miquel_llado's avatar
      Miquel_llado
      New Member

      Sadly not at this point but the table I provided before should be a good enough example, there are three types of rows I should control in this report. If type is "suma" it should retrieve a sumatory of all rows starting by any of the numbers in "sums" from data table. If it is "total" it should retrieve a sumatory of provided lines in this same table. If it is "literal" it should retrieve a blank to show an empty line acting as a separator in the report.

       

      My biggest issue here is how to tell dax "sum all the lines starting by ANY of these comma separated values". There is an easy way to do this, like creating a line for each value in "sums" and redirecting it to a certain line, but then I'll end with dozens of lines in this table and I'm trying to keep the model while learning some new dax solutions.