Forum Discussion
MiKeZZa
Post Patron
7 years agoDAX - Exclude values from row total
I want to exclude some values from my total on a row. I've tried some things and I have the feeling that I'm almost there. As you can see I've excluded the red cells from the total in purple, but...
- 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 ) )
MiKeZZa
Post Patron
7 years agoHi 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
MiKeZZa
Post Patron
7 years agoI'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.