Forum Discussion
summerize differently depending on filter
These are all codes I used in the visual
Anonymous
Try to have Jahr and Monat as real columns in the Date table and use them in the table visual and in the SUMMARIZE
- Anonymous3 years agoNot applicable
I double and triple checked and also created the visual new. But still empty
where
Jahr = YEAR ('Date'[Date])Monat = MONTH('Date'[Date])
The code for "Lost_amount3"Lost_amount3 = VAR __SummaryTable =ADDCOLUMNS ( VALUES ( 'Date'[Date].[Monat]), "@value2", [Lost_amount] )RETURNSUMX ( __SummaryTable, [@value2] )
seems to summarize correct for one customerIs it somehow possible to modify this?
- Anonymous3 years agoNot applicable
do you mean like that?
I did change it in the visual too, but Lost_new is still empty
- tamerj13 years ago
Community Champion
Anonymous
Would you please double check that these are the same columns that are used in the table visual one by one?
- tamerj13 years ago
Community Champion
Anonymous
Which table / column represents the costomer?
- Anonymous3 years agoNot applicable
The customers are coming from a table, that selects column from table
relationships are:
- tamerj13 years ago
Community Champion
Anonymous
Please try
Lost_amount3 =
SUMX (
CROSSJOIN ( VALUES ( 'Date'[Monta] ), VALUES ( 'Lost_prep'[Cliento] ) ),
[Lost_amount]
) - Anonymous3 years agoNot applicable
Hmmm, now it summarizes, but it has the wrong amount. Lost_amount should be the same as Lost_amount3
- tamerj13 years ago
Community Champion
Anonymous
Please tryLost_amount3 = SUMX ( GENERATE ( SUMMARIZE ( 'Date', 'Date'[Jahr], 'Date'[Monta] ), CALCULATETABLE ( VALUES ( 'Lost_prep'[Cliento] ) ) ), [Lost_amount] ) - Anonymous3 years agoNot applicable
It summarized too much. So, I thought it would be better with a filter
but even this does not change something. The total still not a summary
Is this a relationship issue?
- tamerj13 years ago
Community Champion
Anonymous
Not sure to be honest. Please try
Lost_amount3 =
SUMX (
GENERATE (
SUMMARIZE ( 'Date', 'Date'[Jahr], 'Date'[Monta] ),
CALCULATETABLE ( VALUES ( 'Lost_prep'[Cliento] ) )
),
CALCULATE (
[Lost_amount],
CROSSFILTER ( 'Date'[Date], '2_Abfrage_Orderline'[Date], BOTH )
)
) - Anonymous3 years agoNot applicable
Lost_amount3 does not match with Lost_amount. DAX seems to be very complicated
- tamerj13 years ago
Community Champion
Anonymous
It is better to connect and have a direct look at the data. Let me know if this is possible perhaps tomorrow noon Dubai time. - Anonymous3 years agoNot applicable
Oh this would be so great. How can we connect?