Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

summerize differently depending on filter

Hi,
because my "Lost_amount"

lost_flower_2-1677399462514.png

 

does not summarize the total, I have created "Lost_amount3"
lost_flower_3-1677399485857.png

 

 

But depending on how many customers (=CYname) it summarizes differently.

 

Correct for one customer:

lost_flower_1-1677399236566.png

 

Something else instead of Total for more customers. (It is not even the average. No clue what it is summarizing)

lost_flower_4-1677399836453.png

 

Some ideas how this can be fix?

 

Thanks

 

 

20 REPLIES 20
tamerj1
Super User
Super User

Anonymous
Not applicable

Hi, thanks for your help again 🙂
I thought it works, but then I continued all night and now it is empty again. The columns did not change, the relationships did not change. I can't immagine why your code does not work not. So build up on your idea I used the summary table, which is now called "Lost_amount3", but this summarizes strange

@Anonymous 
This way should work

Lost_new =
SUMX (
    SUMMARIZE (
        '6_Lost',
        '6_Lost'[StartDate],
        '6_Lost'[EndDate],
        '6_Lost'[Product],
        '6_Lost'[CYname],
        'Date'[Jahr],
        'Date'[Monat]
    ),
    [Last_Sales]
)
Anonymous
Not applicable

This is empty too. Or do I have to add this code in front of something?

@Anonymous 
Please share a screenshot along with the dax code you wrote.

Anonymous
Not applicable

These are all codes I used in the visual

lost_flower_0-1677407131300.png

 

lost_flower_1-1677407169560.png

 

lost_flower_2-1677407189917.png

 

lost_flower_3-1677407255171.png

 

lost_flower_4-1677407288291.png

 

 

@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 

Anonymous
Not applicable

do you mean like that?

lost_flower_0-1677409058364.png

I did change it in the visual too, but Lost_new is still empty 

@Anonymous 

Would you please double check that these are the same columns that are used in the table visual one by one?

Anonymous
Not applicable

I double and triple checked and also created the visual new. But still empty

lost_flower_0-1677414276818.png

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] )
RETURN
    SUMX ( __SummaryTable, [@value2] )

seems to summarize correct for one customer

lost_flower_1-1677414457881.png

 

Is it somehow possible to modify this?

@Anonymous 

Which table / column represents the costomer?

Anonymous
Not applicable

The customers are coming from a table, that selects column from table

lost_flower_2-1677419412434.png

 

 

relationships are:

lost_flower_0-1677419268044.png

 

@Anonymous 

Please try

Lost_amount3 =
SUMX (
CROSSJOIN ( VALUES ( 'Date'[Monta] ), VALUES ( 'Lost_prep'[Cliento] ) ),
[Lost_amount]
)

Anonymous
Not applicable

Hmmm, now it summarizes, but it has the wrong amount. Lost_amount should be the same as Lost_amount3

lost_flower_0-1677421337644.png

 

@Anonymous 
Please try

Lost_amount3 =
SUMX (
    GENERATE (
        SUMMARIZE ( 'Date', 'Date'[Jahr], 'Date'[Monta] ),
        CALCULATETABLE ( VALUES ( 'Lost_prep'[Cliento] ) )
    ),
    [Lost_amount]
)
Anonymous
Not applicable

It summarized too much. So, I thought it would be better with a filter

lost_flower_0-1677423828602.png

but even this does not change something. The total still not a summary

lost_flower_1-1677424199643.png

Is this a relationship issue?

 

@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 )
)
)

Anonymous
Not applicable

Lost_amount3 does not match with Lost_amount. DAX seems to be very complicated

lost_flower_0-1677428001753.png

 

@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.

Anonymous
Not applicable

Oh this would be so great. How can we connect? 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors