Forum Discussion
DAX - Exclude values from row total
- 7 years ago
Well, "no success at all" sounds like a bit of an exaggeration...
(N+1)th version. I had posted this already immediately after my latest post as I realised there was an error. But for some reason the post has disappeared. Here it is again
totalamount_openD = VAR income = CALCULATE ( SUM ( 'table'[amount] ); 'table'[header] = "income" ) VAR costs = CALCULATE ( SUM ( 'table'[amount] ); 'table'[header] = "costs" ) VAR income_open = CALCULATE ( SUM ( 'table'[amount_open] ); 'table'[header] = "income" ) VAR costs_open = CALCULATE ( SUM ( 'table'[amount_open] ); 'table'[header] = "costs" ) RETURN IF ( ISFILTERED ( date_table[yearmonth] ); IF ( ISFILTERED ( 'table'[header] ); CALCULATE ( SUM ( 'table'[amount] ) ); income - costs ); IF ( ISFILTERED ( 'table'[header] ); CALCULATE ( SUM ( 'table'[amount_open] ) ); income_open - costs_open ) )
Hi MiKeZZa
What is on the rows of yor matrix? What fields?
Can you share the file (with dummy data if necessary)?
- MiKeZZa7 years ago
Post Patron
Hi AlB,
Haven't found a way to easy mask some data so if it's really necessary I'll make it tonight. But that will cost me about an hour I guess.
On the rows is:
header
columngroup
column
subcolumn
detail- MiKeZZa7 years ago
Post Patron
I've been able to make a simple and small example. Can be downloaded here: https://ufile.io/3o1tu
I've put the DAX back to an earlier version; be aware that costs ánd income are positive but at the end they are abstracted.