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
Miquel_llado
New Member

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 2
amitchandak
Super User
Super User

@Miquel_llado ,Can you share sample data and sample output in table format?

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. 

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.

Top Solution Authors