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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Black-Rabbit
Frequent Visitor

SUMMARIZE WITH SEGMENT DATE FILTER

Hello,

I'm trying to make a group by base on date selection using a date segment.

 

GROUPBY_TABLE = SUMMARIZE(Table1;Table1[CodeFournisseur];"Total";CALCULATE(SUM(Table1detail[MontantHT]);FILTER(Table1;Table1[Date])))

 

I use also Table1[Date] like segment.

I Can't make a filter with my segment is Table1[Date].

 

Thks for your help.

11 REPLIES 11
camargos88
Community Champion
Community Champion

Hi @Black-Rabbit ,

 

Are you trying to apply a filter while create a table ? 

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi @camargos88 

Thks for your reply.

I create table when using "Summarize".

I try also to use "CalculateTable(Summarize,Filter)" but i still can't use date filter into slicer.

@Black-Rabbit ,

 

I mean, are you trying to create a table with dynamic date on the fly or just use the date column as filter once you have a table ?

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88,

 

I just want to use date as filter for "Calculate(sum)".

Into my table "Table1" i have already "Table1[Date]".

I just want to use this date into filter according date selected into slicer.

@Black-Rabbit ,

 

Can you provide some data as an example ? Are u getting any error ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88,

 

Table1 = CodeFournisseur, Date,CodeCmde

{F001, 01/04/2020, CD001}

{F002, 01/03/2020, CD002}

{F001, 01/02/2020, CD003}

{F002, 01/01/2020, CD004}

 

Table1Detail = CodeCmde, Product, MontantHT

{CD001, Product1, 300}

{CD002, Product2, 200}

{CD003, Product3, 400}

{CD004, Product4, 500}

{CD004, Product5, 1000}

 

And i would like to have something like that accoding to date selected into slicer (Min Date - Max Date)

{F001, Sum(Amount)}

{F002, Sum(Amount)}

Hi,

 

Please try to create a slicer table first:

Date Slicer = DISTINCT(SELECTCOLUMNS(Table1,"Date",Table1[Date]))

Then try this measure:

Measure =
CALCULATE (
    SUM ( Table1Detail[MontantHT] ),
    FILTER (
        Table1Detail,
        RELATED ( Table1[Date] ) >= MIN ( 'Date Slicer'[Date] )
            && RELATED ( Table1[Date] ) <= MAX ( 'Date Slicer'[Date] )
    )
)

When you choose min and max date in seperate date slicer, the result shows:

52.PNG

Here is the relationship:

1.jpg

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

Hi @v-gizhi-msft , @camargos88 

 

Thks @v-gizhi-msft  for yur reply.

But actually, my date table is already related to my table1  with "Calendar(FirstDate(Table1[Date]), LastDate(Table1[Date]))"

And i already have result without using any mesure.

So i would like to have same result creating new table with "Summarize".

Is it possible ?

Hi,

 

I think you can not dynamically generate a new summarize table by slicer.

Once a summarize table is generated, it will not be changed by any other filter.

 

Best Regards,

Giotto Zhi

@v-gizhi-msft @camargos88 ,

 

Thks @v-gizhi-msft  for your replay.

But i need to do that.

How can i do that with another DAX Code ?

@Black-Rabbit ,

 

Are you able to import the data and create a relationship between them ?

If yes, it's just drag a slicer with date column and a table with the column values.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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