The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
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.
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 ?
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.
Can you provide some data as an example ? Are u getting any error ?
Ricardo
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:
Here is the relationship:
Here is my test pbix file:
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
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
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
81 | |
57 | |
48 | |
48 |